Impotence can have emotional causes but most often it is due to a physical problem. The physical causes of impotence include diseases (such as diabetes and hypertension), injuries (such as from prostate surgery), side-effects of drugs (such as the protease inhibitors used in HIV therapy), and disorders (such as atherosclerosis) that impair blood flow in the penis. Impotence is treatable in all age groups. Treatments include psychotherapy, vacuum devices, surgery and, most often today, drug therapy.
Performance anxiety can be another cause of impotence. If a person wasn’t able to achieve an erection in the past, he may fear he won’t be able to achieve an erection in the future. A person may also find he can’t achieve an erection with a certain partner. Someone with ED related to performance anxiety may be able to have full erections when masturbating or when sleeping, yet he isn’t able to maintain an erection during intercourse.
If you have unstable heart disease of any kind, heart failure or unstable, what we call angina, contraindication to using the medications. All right? So if you’re in an unstable medical state, these medications are not a good idea. Now, there are relative issues. If you may be taking a blood pressure medicine or a medicine for your prostate which dilates your blood vessel a little bit– you know, the typical ones are what we call the alpha blockers– you may have an additive effect from the medication. But for the most part, the medicines are incredibly safe.
For younger men, erection problems usually go hand-in-hand with anxiety. It goes something like this. He fancies you and wants to turn you on. But he’s also worried he might not get, or keep, his erection (particularly if he really likes you and/or if this has been a problem in past relationships). These worries mean that when you try and have sex he doesn’t get hard at all, or loses his erection when he tries to penetrate you.
So here’s something that’s really fascinating. Healthy eating is a way to reduce anxiety and stress. Now how, you may be asking, right? Well, think about it. We live in a world where there are so many variables and where we don’t have control over our lives. But now, with healthy eating, we have control over what goes into our body. And now having that control empowers us to be even healthier, to be more directive in what we do. And certainly, that begins then to reduce the anxiety and the stress. So all in one, you have a healthier body, but certainly a healthier mind.
Long-term predictions based on an aging population and an increase in risk factors (eg, hypertension, diabetes, vascular disease, pelvic and prostate surgery, benign prostatic hyperplasia, and lower urinary tract symptoms) suggest a large increase in the number of men with ED. In addition, the prevalence of ED is underestimated because physicians frequently do not question their patients about this disorder.
NO is produced by the enzyme NO synthase (NOS).  NOS plays many roles, ranging from homeostasis to immune system regulation. To date, 3 subtypes have been identified: nNOS, iNOS, and eNOS, which are produced by the genes NOS1, NOS2, and NOS3, respectively. This nomenclature is derived from the sources of the original isolates: neuronal tissue (nNOS), immunoactivated macrophage cell lines (iNOS), and vascular endothelium (eNOS). The subtypes are not, however, limited to the tissues from which they were first isolated.
Tests such as the bulbocavernosus reflex test are used to determine if there is sufficient nerve sensation in the penis. The physician squeezes the glans (head) of the penis, which immediately causes the anus to contract if nerve function is normal. A physician measures the latency between squeeze and contraction by observing the anal sphincter or by feeling it with a gloved finger inserted past the anus.
It doesn't really matter what they are — sexual turnoffs vary wildly from person to person. But if the person you're getting it on with is doing stuff that's taking you out of the mood — even if it's stuff you feel like you're supposed to enjoy — it's time to swallow your pride and say something. Keeping it a secret might be saving you an awkward conversation in the short term, but in the long term, it could be seriously undermining your sex life.
#3 You’re not having enough sex. The more sex you’re having, the less likely you are to suffer from erectile issues. The American Journal of Medicine reports that men who had sex once *or more* a week were less likely to have issues getting and maintaining an erection. So, not having sex is actually one of the reasons you can’t get hard. [Read: 13 ways to have better sex and change the way you make love]
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.
Exercise and lifestyle modifications may improve erectile function. Weight loss may help by decreasing inflammation, increasing testosterone, and improving self-esteem. Patients should be educated to increase activity, reduce weight, and stop smoking, as these efforts can improve or restore erectile function in men without comorbidities. Precise glycemic control in diabetic patients and pharmacologic treatment of hypertension may be important in preventing or reducing sexual dysfunction. 
The penis contains three cylinders, the two corpora cavernosa, which are on the top of the penis (see figure 1 below). These two cylinders are involved in erections. The third cylinder contains the urethra, the tube that the urine and ejaculate passes through, runs along the underside of the penis. The corpus spongiosum surrounds the urethra. Spongy tissue that has muscles, fibrous tissues, veins, and arteries within it makes up the corpora cavernosa. The inside of the corpora cavernosa is like a sponge, with potential spaces that can fill with blood and distend (known as sinusoids). A layer of tissue that is like Saran Wrap, called the tunica albuginea, surrounds the corpora. Veins located just under the tunica albuginea drain blood out of the penis.
In their extensive review, Bassil and coworkers summarise the benefits and risks, with benefits such as improvement of sexual function, bone density, muscle strength, cognition and overall improvement in quality of life. Among the risks that have been suggested include erythrocytosis, liver toxicity, worsening of sleep apnoea and cardiac function, possibly increasing symptoms of benign prostatic hyperplasia (BPH). They also note that although a possibility of stimulation of prostate cancer has been hypothesised, no scientific or clinical evidence exists to this possible risk.38
The more you puff, the more you put your penis at risk, according to a study from the Tulane University School of Public Health and Tropical Medicine. The researchers examined 7,684 men between the ages of 35-74 and concluded about 23 percent of erectile dysfunction cases can be chalked up to cigarette smoking. This is probably the best motivator If you've been struggling to quit.
Conditions that may be associated with ED include diabetes, [25, 26, 27] hypertension,  , and CAD, as well as neurologic disorders, endocrinopathies, benign prostatic hyperplasia,  , sleep apnea  , COPD,  and depression (see Table 1 below). [32, 33, 34, 35] In fact, almost any disease may affect erectile function by altering the nervous, vascular, or hormonal systems. Various diseases may produce changes in the smooth muscle tissue of the corpora cavernosa or influence the patient’s psychological mood and behavior.
It is important for clinicians prescribing these drugs to make the patient aware of the action of the drugs especially the fact that they do not result in an immediate erection, and that they do not cause an erection without sexual stimulation. There is frequently a great expectation when men begin using these drugs and it is wise to temper their enthusiasm and explain they do not work immediately, and may not work every time, but also let the patient know that if these drugs do not work, there are other options.
The medications are extremely effective, which is very good. And the medications are, for the most part, extremely well-tolerated. But there are, like with any medications, a potential downside. The one absolute downside to the use of any of these erection what we call PDE5 medications is if a patient is using a nitroglycerin medication. And nitroglycerins are used for heart disease and for angina, for the most part, although there are some recreational uses of nitrites. And that’s important because your blood vessels will dilate and your blood pressure will drop. And that is an absolute contraindication.
A vacuum erection device helps draw blood into the penis by applying negative pressure. This type of device is sometimes referred to as penis pump and may be used just prior to sexual intercourse. Several types of FDA approved vacuum therapy devices are available with a doctor's prescription. When pharmacological methods fail, a purpose-designed external vacuum pump can be used to attain erection, with a separate compression ring fitted to the penis to maintain it. These pumps should be distinguished from other penis pumps (supplied without compression rings) which, rather than being used for temporary treatment of impotence, are claimed to increase penis length if used frequently, or vibrate as an aid to masturbation. More drastically, inflatable or rigid penile implants may be fitted surgically.
In some cases, ED can be a warning sign of more serious disease. One study suggests ED is a strong predictor of heart attack, stroke, and death from cardiovascular disease. The researchers say all men diagnosed with ED should be evaluated for cardiovascular disease. This does not mean every man with ED will develop heart disease, or that every man with heart disease has ED, but patients should be aware of the link.