Sildenafil is used to treat erectile dysfunction and pulmonary arterial hypertension. It blocks the PDE5 enzyme, relaxing blood vessels. For erectile dysfunction, it increases blood flow to the penis during arousal. For pulmonary hypertension, it relaxes lung blood vessels, lowering pressure and reducing heart strain.