Psychological processes such as depression, anxiety, and relationship problems can impair erectile functioning by reducing erotic focus or otherwise reducing awareness of sensory experience. This may lead to inability to initiate or maintain an erection. Etiologic factors for erectile disorders may be categorized as neurogenic, vasculogenic, or psychogenic, but they most commonly appear to derive from problems in all three areas acting in concert.
The pathogenesis of organic ED is related to dysfunction of the endothelium. Endothelial cells can become injured through a variety of mechanisms, most of which cause oxidative stress on the tissues. Many of these causes of oxidative stress are related to lifestyle issues which lead to hypertension, diabetes and dyslipidaemia (figure 1). Endothelial cell dysfunction results in reduction of endothelium-dependent vasorelaxation as well as increased adhesion of leukocytes to the endothelium. Endothelial cell injury then leads to a variety of sequelae, including ED, other types of vasoconstriction, atherosclerosis and thrombus formation.18
Constriction of the trabecular smooth muscle and helicine arteries induced by sympathetic innervation makes the penis flaccid, with blood pressure in the cavernosal sinuses of the penis near venous pressure. Acetylcholine is thought to decrease sympathetic tone. This may be important in a permissive sense for adequate trabecular smooth muscle relaxation and consequent effective action of other mediators in achieving sufficient inflow of blood into the lacunar spaces. When the trabecular smooth muscle relaxes and helicine arteries dilate in response to parasympathetic stimulation and decreased sympathetic tone, increased blood flow fills the cavernous spaces, increasing the pressure within these spaces so that the penis becomes erect. As the venules are compressed against the tunica albuginea, penile pressure approaches arterial pressure, causing rigidity. Once this state is achieved, arterial inflow is reduced to a level that matches venous outflow.
There are many effective treatments for impotence. The most popular is a class of drugs called phosphodiesterase type 5 (PDE5) inhibitors. These include sildenafil (Viagra), vardenafil (Levitra), tadalafil (Cialis) and avanafil (STENDRA). These drugs are taken in pill form. They work in most men. But they are less effective in men with neurological causes of impotence.
Vascular damage may result from radiation therapy to the pelvis and prostate in the treatment of prostate cancer.  Both the blood vessels and the nerves to the penis may be affected. Radiation damage to the crura of the penis, which are highly susceptible to radiation damage, can induce ED. Data indicate that 50% of men undergoing radiation therapy lose erectile function within 5 years after completing therapy; fortunately, some respond to one of the PDE5 inhibitors.
Or, perhaps, since it's been only eight months, it might actually scare you a bit. It can be unsettling when someone falls head over heels. It can be hard to trust that kind of enthusiasm, especially if you've been burned by someone who went from hot-and-heavy to suddenly cold. Even if you're crazy about him, you might need to slow things down a little. Or maybe it's harder for you to say than it is for him — and that's why it rubs you wrong.
Along the same vein as stress, relationship troubles may also be at the root of some men’s erectile problems. Not trusting your partner, fears of birth control failure, or just genuinely not being emotionally attached to a partner could make it hard for a man to have an erection, The Huffington Post reported. Talking about issues within a relationship can help to resolve this problem.
Nerve or spinal cord damage: Damage to the spinal cord and nerves in the pelvis can cause erectile dysfunction. Nerve damage can be due to disease, trauma, or surgical procedures. Examples include injury to the spinal cord from automobile accidents, injury to the pelvic nerves from prostate surgery for cancer (prostatectomy), and some surgeries for colorectal cancer, radiation to the prostate, surgery for benign prostatic enlargement, multiple sclerosis (a neurological disease with the potential to cause widespread damage to nerves), and long-term diabetes mellitus.
If you're regularly having trouble getting or maintaining erection and it's not situation specific (for instance, this happens whether you're with a partner or alone or watching porn or whatever), it could be a tip-off to a physiological problem. Diabetes, high cholesterol, high blood pressure, and cardiovascular issues can all present with erectile problems, says Paduch. That's because basically anything affecting your nerves or blood flow can impact your boners.
If a man's arteries become blocked with cholesterol – as a result of genetics, and/or lifestyle factors such as smoking, a poor diet and lack of exercise – it will affect the vessels all over his body. The arteries supplying the penis are relatively small, just 1-2mm wide, and so they become blocked more quickly than others. The blood flow to the area is reduced, meaning erections become more difficult.
However, in contrast, a recent systematic review of published studies, the authors concluded that overall, the addition of testosterone to PDE-5 inhibitors might benefit patients with ED associated with testosterone levels of less than 300 ng/dL (10.4 nmol/L) who failed monotherapy.  A limitation of existing studies are their heterogeneous nature and methodological drawbacks.
Before delving into the causes and solutions to erectile dysfunction, it’s first important to understand how erections work. The penis is mostly comprised or fibrous tissue that fills with blood upon arousal. This is what causes an erection, and after arousal is finished, blood drains back out into the body and the penis becomes flaccid. Men can have erections for no discernible reason throughout the day, but when sexual stimulation occurs, rather through contact, visual, audible, or mental stimulation, the potential for achieving an erection increases.
Whatever happens, remember there are still ways you can have fun and be intimate even if your partner can’t get an erection. Exchanging sexy texts, reading erotic literature, and indulging in sensual massage can all help to relax, inspire and increase intimacy. Of course, every couple is different and it may take a while to find out what works for you.
Erectile dysfunction may be an unpleasant condition that no one really wants to talk about, failing to acknowledge it won’t make the problem go away. Your best defense against health problems like this is to learn everything you can about it so you can tackle the problem at the root. If you’re ready to stop living in embarrassment about your sexual function, become an advocate for yourself and your own health and talk to your doctor.
The nerves and endothelium of sinusoids and vessels in the penis produce and release transmitters and modulators that control the contractile state of corporal smooth muscles. Although the membrane receptors play an important role, downstream signaling pathways are also important. The RhoA–Rho kinase pathway is involved in the regulation of cavernosal smooth muscle contraction. 
It's definitely possible that your boner isn't cooperating because it's not really thrilled to be there. Maybe you're not sure about this partner, you're worried about pregnancy or STIs, you're not feeling comfortable with an unfamiliar hookup, or you typically need some other kind of stimulus to get in the mood. It's always worth checking in with yourself to see if one of these factors might be holding you back in bed, says Skyler. If you have a hunch that it's because you're doing something you don't want to do (or you're not doing something you do want to do) pay attention to that hunch.
While pills for ED are convenient, some men sustain stronger erections by injecting medication directly into the penis. Drugs approved for this purpose work by widening the blood vessels, causing the penis to become engorged with blood. Another option is inserting a medicated pellet into the urethra. The pellet can trigger an erection within 10 minutes.