Sildenafil is a medication primarily used to treat erectile dysfunction (ED) and pulmonary arterial hypertension (PAH). It works by increasing blood flow to the penis during sexual stimulation, thus helping men achieve and maintain an erection. In the treatment of PAH, sildenafil helps to relax the blood vessels in the lungs, reducing the workload on the heart and improving exercise capacity. Sildenafil is commonly sold under the brand name Viagra for erectile dysfunction and Revatio for pulmonary arterial hypertension. It belongs to a class of drugs known as phosphodiesterase type 5 (PDE5) inhibitors.