Viagra, generically known as sildenafil , is a prescription drug primarily prescribed for treating erectile difficulties . It functions by promoting blood circulation to the penis , which enables men get and maintain an erection sufficient for sexual intercourse . While usually safe when taken as directed by a medical provider , it's necessary to b