Viagra is a phosphodiesterase inhibitor used to treat sexual function problems such as impotence or erectile dysfunction. In combination with sexual stimulation, Viagra works by helping the blood flow into the penis to achieve and maintain an erection. Viagra is not intended for use in women or children. Viagra will not protect against sexually transmitted diseases including HIV infection.