Viagra, commonly known as sildenafil, is a medication primarily intended to treat erectile dysfunction , a condition where males have difficulty achieving or sustaining an erection . Beyond this purpose, it can utilized off-label in the management of pulmonary hypertension and specific ailments.