Viagra, whose generic name is sildenafil, is a medication used to treat erectile dysfunction (impotence) in men. It works by relaxing muscles found in the walls of blood vessels and increasing blood flow to particular areas of the body. Another brand of sildenafil is Revatio, which is used to treat pulmonary arterial hypertension and improve exercise capacity in men and women.