Penile erection is managed by two mechanisms: the reflex erection, which is achieved by directly touching the penile shaft, and the psychogenic erection, which is achieved by erotic or emotional stimuli. The former uses the peripheral nerves and the lower parts of the spinal cord, whereas the latter uses the limbic system of the brain. In both cases, an intact neural system is required for a successful and complete erection. Stimulation of the penile shaft by the nervous system leads to the secretion of nitric oxide (NO), which causes the relaxation of smooth muscles of corpora cavernosa (the main erectile tissue of penis), and subsequently penile erection. Additionally, adequate levels of testosterone (produced by the testes) and an intact pituitary gland are required for the development of a healthy erectile system. As can be understood from the mechanisms of a normal erection, impotence may develop due to hormonal deficiency, disorders of the neural system, lack of adequate penile blood supply or psychological problems. Spinal cord injury causes sexual dysfunction including ED. Restriction of blood flow can arise from impaired endothelial function due to the usual causes associated with coronary artery disease, but can also be caused by prolonged exposure to bright light.
The rumors are true. Having too much to drink can interfere with a man’s ability to have an erection. According to Everyday Health, alcohol is a depressant. This means that, along with dampening your ability to think, speak, and move efficiently, it can also dampen mood, decrease sexual desire, and make it difficult for a man to achieve erection or reach an orgasm. This is because alcohol decreases blood flow to the penis. That not only may reduce a man’s ability to have an erection, but even if he is lucky enough to get it hard, alcohol can reduce the intensity of his orgasm.
In comparison, 37% of men who had received external radiotherapy as their primary therapy reported the ability to attain functional erections suitable for intercourse, along with 43% of men who had received brachytherapy as primary treatment. Pretreatment sexual health-related quality of life score, age, serum prostate-specific antigen (PSA) level, race or ethnicity, body mass index, and intended treatment details were associated with functional erections 2 years after treatment. 
medicines called alpha-blockers such as Hytrin (terazosin HCl), Flomax (tamsulosin HCl), Cardura (doxazosin mesylate), Minipress (prazosin HCl), Uroxatral (alfuzosin HCl), Jalyn (dutasteride and tamsulosin HCl), or Rapaflo (silodosin). Alpha-blockers are sometimes prescribed for prostate problems or high blood pressure. In some patients, the use of Sildenafil with alpha-blockers can lead to a drop in blood pressure or to fainting
A number of herbs have been promoted for treating impotence. The most widely touted herbs for this purpose are Coryanthe yohimbe (available by prescription as yohimbine, with the trade name Yocon) and gingko (Gingko biloba), although neither has been conclusively shown to help the condition in controlled studies. In addition, gingko carries some risk of abnormal blood clotting and should be avoided by men taking blood thinners such as coumadin. Other herbs promoted for treating impotence include true unicorn root (Aletrius farinosa), saw palmetto (Serenoa repens), ginseng (Panax ginseng), and Siberian ginseng (Eleuthrococcus senticosus). Strychnos Nux vomica has been recommended, especially when impotence is caused by excessive alcohol, cigarettes, or dietary indiscretions, but it can be very toxic if taken improperly, so it should be used only under the strict supervision of a physician trained in its use.
Sexual dysfunction and ED become more common as men age. The percentage of complete ED increases from 5% to 15% as age increases from 40 to 70 years. But this does not mean growing older is the end of your sex life. ED can be treated at any age. Also, ED may be more common in Hispanic men and in those with a history of diabetes, obesity, smoking, and hypertension. Research shows that African-American men sought medical care for ED twice the rate of other racial groups.