Alprostadil should not be used in men with urethral stricture (scarring and narrowing of the tube that urine and the ejaculate pass through), balanitis (inflammation/infection of the glans [tip] of the penis, severe hypospadias (a condition where the opening of the urethra is not at the tip of the penis, rather on the underside of the penis), penile curvature (abnormal bend to the penis), and urethritis (inflammation/infection of the urethra).
It appears that testosterone has NOS-independent pathways as well. In one study, castrated rats were implanted with testosterone pellets and then divided into a group that received an NOS inhibitor (L-nitro-L-arginine methyl ester [L-NAME]) and a control group that received no enzyme.  The castrated rats that were given testosterone pellets and L-NAME still had partial erections, a result suggesting the presence of a pathway independent of NOS activity.
When a man becomes sexually excited, muscles in their penis relax. This relaxation allows for increased blood flow through the penile arteries. This blood fills two chambers inside the penis called the corpora cavernosa. As the chambers fill with blood, the penis grows rigid. Erection ends when the muscles contract and the accumulated blood can flow out through the penile veins.
The dorsal artery provides for engorgement of the glans during erection, whereas the bulbourethral artery supplies the bulb and the corpus spongiosum. The cavernous artery effects tumescence of the corpus cavernosum and thus is principally responsible for erection. The cavernous artery gives off many helicine arteries, which supply the trabecular erectile tissue and the sinusoids. These helicine arteries are contracted and tortuous in the flaccid state and become dilated and straight during erection. 
The most common treatment for erectile dysfunction is drugs known as phosphodiesterase-5 (PDE-5) inhibitors. These include tadalafil (Cialis), vardenafil (Levitra), and sildenafil citrate (Viagra). These are effective for about 75% of men with erectile dysfunction. They are tablets that are taken around an hour before sex, and last between 4 and 36 hours. Sexual stimulation is required before an erection will occur. The PDE-5 inhibitors cause dilation of blood vessels in the penis to allow erection to occur, and help it to stay rigid. Men using nitrate medication (e.g. GTN spray or sublingual tablets for angina) should not use PDE-5 inhibitors.
Erections are neurovascular events, meaning that nerves and blood vessels (arteries and veins) are involved in the process of an erection and all must work properly to develop a hard erection that lasts long enough. Erection begins with sexual stimulation. Sexual stimulation can be tactile (for example, by a partner touching the penis or by masturbation) or mental (for example, by having sexual fantasies, viewing porn). Sexual stimulation or sexual arousal causes the nerves going to the penis to release a chemical, nitric oxide. Nitric oxide increases the production of another chemical, cyclic GMP (cGMP), in the muscle of the corpora cavernosa. The cGMP causes the muscles of the corpora cavernosa to relax, and this allows more blood to flow into the penis. The incoming blood fills the corpora cavernosa, making the penis expand.
Oral phosphodiesterase type 5 inhibitors (PDE5 inhibitors) unless contraindicated are the recommended first line medical therapy for erectile dysfunction. Currently, there are four different PDE5 inhibitors available. They all work the same way and have essentially the same results. They differ in how long they last in your body and in side effects.
Risks associated with injection therapy including bleeding, pain with injection, penile pain, priapism, and corporal fibrosis (scarring inside of the corpora cavernosa). There is also concern that repetitive injections in the same area could cause scar tissue to build up in the tunica albuginea that could create penile curvature. Thus, doctors recommended that one alternate sides with injection and perform injections no more frequent than every other day.
The primary nerve fibers to the penis are from the dorsal nerve of the penis, a branch of the pudendal nerve. The cavernosal nerves are a part of the autonomic nervous system and incorporate both sympathetic and parasympathetic fibers. They travel posterolaterally along the prostate and enter the corpora cavernosa and corpus spongiosum to regulate blood flow during erection and detumescence. The dorsal somatic nerves are also branches of the pudendal nerves. They are primarily responsible for penile sensation.