The penis is made up of tissue and blood vessels that become engorged during an erection. Erectile dysfunction medications primarily work by improving blood flow to the penis. So you can get and maintain an erection for sexual activity. While medications like Viagra (sildenafil) work by blocking an enzyme called phosphodiesterase-5 (PDE5). By blocking PDE5, these medications allow enhanced blood flow to the penis during sexual stimulation.