What is an erection, and how do erections work?

7 min read

Written by: 

John Wood

Reviewed by: 

Raagini Yedidi, MD

Published: May 19, 2020

Updated:  Apr 30, 2026

Trusted source badge

Reviewed By

Raagini Yedidi, MD

Raagini Yedidi, MD, is an internal medicine resident and medical reviewer for Ro.

View bio

Key takeaways

  • An erection happens when arousal signals from the brain trigger a chain reaction that causes blood vessels in the penis to relax and widen, allowing blood to rush in and fill the erectile tissue. The blood is then trapped, causing an erection. The erection ends when blood is allowed to drain back out.

  • There's no fixed "normal" for how long an erection should last. Research puts the average during sex at around 5–7 minutes, with a wide range from under a minute to over 44 minutes.

  • Erections depend heavily on cardiovascular health. Conditions like high blood pressure, diabetes, and high cholesterol are some common contributors to erectile dysfunction.

  • An erection lasting more than four hours is called priapism and requires emergency medical attention to prevent damage to the penis.

Here's what we'll cover

Here's what we'll cover

Key takeaways

  • An erection happens when arousal signals from the brain trigger a chain reaction that causes blood vessels in the penis to relax and widen, allowing blood to rush in and fill the erectile tissue. The blood is then trapped, causing an erection. The erection ends when blood is allowed to drain back out.

  • There's no fixed "normal" for how long an erection should last. Research puts the average during sex at around 5–7 minutes, with a wide range from under a minute to over 44 minutes.

  • Erections depend heavily on cardiovascular health. Conditions like high blood pressure, diabetes, and high cholesterol are some common contributors to erectile dysfunction.

  • An erection lasting more than four hours is called priapism and requires emergency medical attention to prevent damage to the penis.

Erections show up uninvited in middle school and can get more unreliable as you get older. Either way, they can feel completely out of your control. So how do erections work? Understanding the biology can help explain why things go wrong and what to do about it, including how to address erectile dysfunction (ED).

What is an erection?

An erection is what happens when the smooth muscle inside the penis relaxes, allowing blood to rush in and fill the erectile tissue. As the tissue expands, it compresses the veins. This traps blood inside and causes the penis to stiffen. It can happen in response to arousal, physical touch, or sometimes seemingly out of nowhere.

It's more complex than it looks because multiple systems have to cooperate: your hormones, nerves, blood vessels, and brain all play a role. One disruption anywhere in that chain — a blood pressure problem, a nerve issue, stress — can interrupt the whole process and lead to ED.

When everything works correctly, the penis fills with blood under pressure, enough to create the rigidity needed to become fully erect.

Find your starter ED treatment

Anatomy of the penis: what makes an erection possible?

To understand how erections work, it helps to know what's actually inside the penis. Here’s what’s going on in there:

  • Corpora cavernosa: Two cylindrical chambers made of spongy erectile tissue that run the length of the penis.

  • Corpus spongiosum: A third chamber surrounding the urethra. It also fills with blood but stays less rigid, which keeps the urethra open during ejaculation.

  • Tunica albuginea: A tough fibrous sheath wrapped around the corpora cavernosa. During an erection, it compresses the veins that would normally drain blood away, trapping it in and maintaining rigidity.

  • Cavernosal arteries: The main blood supply to the corpora cavernosa.

  • Deep dorsal vein: The main vein that drains blood away from the penis when an erection ends.

  • Nerves: Signals travel from the brain down the spinal cord to the pelvic nerves and into the penis. The cavernosal nerves trigger the smooth muscle relaxation that initiates an erection, while the dorsal nerve, which runs along the top of the penis, carries sensation signals back to the brain.

Each of these components has to function properly for a full erection to happen. Problems with any one of them — arterial narrowing, nerve damage, or changes to the tunica albuginea — can show up as erectile issues.

OC What is an erection, and how does it work? image bb203cf1-29d2-4c24-8dc3-7ba9e6e82909

How do erections work? Step-by-step process

Every erection follows the same relay race, starting in the brain and ending with blood locked into the penis under pressure. Here’s how they work

1. Arousal starts in the brain

A visual cue, a thought, a fantasy, or physical touch sends a signal from the brain down the spinal cord to the pelvic nerves.

2. Nerve endings release nitric oxide

This triggers the production of a chemical called cGMP, which tells the smooth muscle tissue inside the penis to relax. 

3. Blood vessels widen 

As the muscle relaxes, the arteries supplying the penis dilate, and blood starts flowing in. 

4. Blood rushes in

The corpora cavernosa fill rapidly as blood flow increases

5. Veins get compressed

The expanding tissue presses against the tunica albuginea, squeezing the veins that would normally drain blood away. Blood becomes trapped

6. An erection is maintained

With blood flowing in and nowhere to drain, pressure builds, and the penis becomes erect and rigid.

7. The erection ends (detumescence)

After ejaculation or when arousal fades, an enzyme called phosphodiesterase-5 (PDE5) breaks down the cGMP. The muscle contracts, blood drains out, and the penis returns to its flaccid state.

This is exactly where PDE5 inhibitors like sildenafil and tadalafil come in. They block PDE5 from breaking down cGMP, keeping smooth muscle relaxed and blood flowing longer.

The 3 types of erections

Not all erections start the same way. There are three distinct types, each triggered through a different pathway:

Psychogenic erections

Psychogenic erections are triggered by mental stimulation, such as thoughts, fantasies, visual cues, or memories. The signal starts in the brain and travels down through the upper spinal cord to the penis.

Reflexogenic erections

Reflexogenic erections are triggered by direct physical stimulation, typically of the genitals or surrounding area. These travel a shorter route through the lower spinal cord, which is why they can occur even in people with certain spinal cord injuries, depending on which level was affected.

Nocturnal erections

Nocturnal erections happen during rapid eye movement (REM) sleep. Most people with penises experience 3–5 per night, each typically lasting anywhere from 10 to 30 minutes.

Despite what you might expect, nighttime erections aren’t typically triggered by what you're dreaming about. They're thought to play a role in keeping the penis healthy by maintaining blood flow while you sleep.

These sleep erections can also have real diagnostic value. If you're getting normal nocturnal erections but struggling during sex, your plumbing is likely working, and the issue may be more likely to be psychological rather than physical — something a healthcare provider can help you explore.

How long erections normally last

There's no single "normal" duration for an erection. It varies based on age, arousal level, stress, medications, alcohol, and how your body works individually.

The closest thing to a benchmark comes from ejaculation research. A large study of 500 couples across five countries found the median time from penetration to ejaculation was 5.4 minutes, though the range ran from under a minute to just over 44 minutes. For most people, an erection during sex lasts roughly as long as the activity itself.

A few things can shorten that window: getting older, stress or anxiety, alcohol, certain medications (including some blood pressure drugs and antidepressants), and any cardiovascular condition that reduces blood flow.

One important upper limit: an erection lasting more than four hours is called priapism, and that’s a medical emergency. Blood trapped in the penis without circulating can become starved of oxygen, which can permanently damage erectile tissue. If this happens to you, go to the nearest emergency room right away.

Daily Rise Gummies

Help treat BPH symptoms with daily tadalafil gummies

How to maintain an erection

Whether you're trying to figure out how to get a boner or how to keep an erection, the answer starts in the same place: blood flow. Anything that affects your heart and blood health can show up in your erections over time. Which means taking care of both is one of the most effective things you can do for your sexual health long term.

Protect your heart and blood health

High blood pressure, high cholesterol, and diabetes are among the most common contributors to ED. All three damage blood vessels over time, cutting off the blood flow that erections depend on. Managing these conditions through lifestyle changes and, where necessary, medication can make a real difference.

Quit smoking and moderate your alcohol intake

Smoking interferes with the chemical signals that trigger an erection and damages the blood vessels that make one possible. Heavy alcohol use slows your nervous system and reduces blood flow. Both take a toll on erectile function.

Exercise regularly

Getting around 40 minutes of moderate to vigorous exercise four times a week may help improve erectile function. This is particularly true for people whose ED is linked to physical inactivity, diabetes, high blood pressure, and carrying excess weight.

Manage stress and performance anxiety

Stress causes your body to release adrenaline, which tightens blood vessels, directly working against an erection. Performance anxiety can make this worse: Worrying about losing an erection makes you more likely to lose it. If anxiety is a consistent factor, it's worth raising with a healthcare provider.

Consider medication options

PDE5 inhibitors, including sildenafil (Viagra) and tadalafil (Cialis), block the enzyme that breaks down cGMP, keeping blood flowing longer. They tend to work best when some underlying blood flow is still intact. And they require arousal, too. 

Any decision about medication should be made with a healthcare provider based on your specific health situation. Ro providers are often available within 24 hours if you’d like to explore your options.

What is ejaculation?

Ejaculation is the release of semen from the penis, typically at the height of sexual arousal.

It happens in two steps. First, sperm travel from the epididymis (a small organ that sits atop/behind the testicles) through a tube called the vas deferens, picking up fluid from the prostate and seminal vesicles along the way. This is the emission phase. Then the muscles at the base of the penis contract rhythmically to push it out, known as the expulsion phase.

Orgasm typically occurs at the same time as expulsion, though it’s a separate process from the brain rather than directly caused by muscle contractions.

Ejaculation is coordinated by the spinal cord and shaped by the brain, which is why psychological factors like stress and anxiety can affect it. And while erections and ejaculations are connected, they're actually separate processes, so difficulties with one don't automatically mean difficulties with the other.

What can go wrong: when erections don't work

Erections depend on your brain, nerves, blood vessels, and hormones all working together — and a problem in any one of them can disrupt the whole process.

Erectile dysfunction

ED is the inability to get or keep an erection firm enough for satisfying sex, and it becomes more common with age.

The causes can be physical (poor blood flow, nerve damage from diabetes or surgery, or low testosterone), psychological, like anxiety or depression, or a mix of both.

ED can sometimes be an early warning sign of heart and blood vessel problems. The arteries supplying the penis are smaller than those supplying the heart. So in some cases, they may show damage first, potentially years before any cardiac symptoms appear. 

If you're experiencing ED, a heart health checkup is a smart next step.

Priapism

Priapism is an erection that won't go away for longer than four hours, usually because blood gets trapped and can't drain out. Common causes include certain medications, sickle cell disease, and injury to the pelvic area. As noted above, if an erection lasts more than four hours, get to an emergency room immediately.

Peyronie's disease

Peyronie's disease happens when scar tissue forms inside the penis (sometimes as a result of minor injury or trauma, including from sexual activity), causing it to curve during an erection. 

Some curvature is completely normal. But when the bend causes pain, makes sex difficult, or is accompanied by a noticeable change in erection quality, it may be worth speaking with a healthcare provider.

Ro Sparks

Hard in 15 mins (on avg), ready for up to 36 hours, 2-in-1 formula

Bottom line: how do erections work?

Erections are more complex than they seem —  when something goes wrong, it's rarely random. So, how do erections work? Here's what's worth keeping in mind:

  • Erections involve a lot of body parts. Your brain, nerves, blood vessels, and hormones all have to work together, and a problem in any one of them can lead to ED.

  • Your heart health and sexual health are closely linked. High cholesterol, high blood pressure, and diabetes are among the most common contributors to ED, and managing them can make a real difference.

  • Morning wood is more than a punchline. Nocturnal erections are a sign that your blood flow and nerve pathways are working. If they disappear, it can be an early sign that something physical is going on.

  • Medication can help, but it's not one-size-fits-all. PDE5 inhibitors like sildenafil and tadalafil may be effective for many people, but the right option depends on your specific situation and should be discussed with a healthcare provider.

  • Four hours is the limit when it comes to erections. An erection lasting longer than that is priapism, a medical emergency that needs immediate attention.

If your erections aren't doing what you'd like them to, talking with a Ro provider is a good place to start.

Frequently asked questions (FAQs)

DISCLAIMER

If you have any medical questions or concerns, please talk to your healthcare provider. The articles on Health Guide are underpinned by peer-reviewed research and information drawn from medical societies and governmental agencies. However, they are not a substitute for professional medical advice, diagnosis, or treatment.

Viagra Important Safety Information: Read more about serious warnings and safety info.

Cialis Important Safety Information: Read more about serious warnings and safety info.

References

  • Broderick, G. A., Kadioglu, A., Bivalacqua, T. J., et al. (2010). Priapism: pathogenesis, epidemiology, and management. Journal of Sexual Medicine, 7(1), 476–500. doi: 10.1111/j.1743-6109.2009.01625.x. Retrieved from https://pubmed.ncbi.nlm.nih.gov/20092449/

  • Choi, S. M., Seo, D. H., Lee, S. W., et al. (2017). The effect of alcohol administration on the corpus cavernosum. World Journal of Men's Health, 35(1), 34–42. doi: 10.5534/wjmh.2017.35.1.34. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC5419118/

  • Dhaliwal, A. & Gupta, M. (2023). PDE5 inhibitors. StatPearls. Retrieved on Apr. 14, 2026 from https://pubmed.ncbi.nlm.nih.gov/31751033/

  • Dorey, G., Speakman, M. J., Feneley, R. C., et al. (2005). Pelvic floor exercises for erectile dysfunction. BJU International, 96(4), 595–597. doi: 10.1111/j.1464-410X.2005.05690.x. Retrieved from https://pubmed.ncbi.nlm.nih.gov/16104916/

  • Gerbild, H., Larsen, C. M., Graugaard, C., et al. (2018). Physical activity to improve erectile function: A systematic review of intervention studies. Sexual Medicine, 6(2), 75–89. doi: 10.1016/j.esxm.2018.02.001. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC5960035/

  • Giuliano, F. & Clément, P. (2005). Physiology of ejaculation: Emphasis on serotonergic control. European Urology, 48(3), 408–417. doi: 10.1016/j.eururo.2005.05.017. Retrieved from https://pubmed.ncbi.nlm.nih.gov/15996810/

  • Gupta, B. P., Murad, M. H., Clifton, M. M., et al. (2011). The effect of lifestyle modification and cardiovascular risk factor reduction on erectile dysfunction: a systematic review and meta-analysis. Archives of Internal Medicine, 171(20), 1797–1803. doi: 10.1001/archinternmed.2011.440. Retrieved from https://pubmed.ncbi.nlm.nih.gov/21911624/

  • Kessler, A., Sollie, S., Challacombe, B., et al. (2019). The global prevalence of erectile dysfunction: a review. BJU International, 124(4), 587–599. doi: 10.1111/bju.14813. Retrieved from https://pubmed.ncbi.nlm.nih.gov/31267639/

  • Kovac, J. R., Labbate, C., Ramasamy, R., et al. (2015). Effects of cigarette smoking on erectile dysfunction. Andrologia, 47(10), 1087–1092. doi: 10.1111/and.12393. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC4485976/

  • Krassioukov, A. & Elliott, S. (2017). Neural control and physiology of sexual function: Effect of spinal cord injury. Topics in Spinal Cord Injury Rehabilitation, 23(1), 1–10. doi: 10.1310/sci2301-1. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC5340504/

  • Muller, A. J., Regier, L., & Jensen, B. (2010). Taking the stress out of treating erectile dysfunction. Canadian Family Physician, 56(9), 898–903. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC2939118/

  • Panchatsharam, P. K., Durland, J., & Zito, P. M. (2023). Physiology, erection. StatPearls. Retrieved on Apr. 14, 2026 from https://www.ncbi.nlm.nih.gov/books/NBK513278/

  • Rajkumar, R. P. & Kumaran, A. K. (2015). Depression and anxiety in men with sexual dysfunction: a retrospective study. Comprehensive Psychiatry, 60, 114–118. doi: 10.1016/j.comppsych.2015.03.001. Retrieved from https://pubmed.ncbi.nlm.nih.gov/25818906/

  • Sandean, D. P., Leslie, S. W., & Lotfollahzadeh, S. (2024). Peyronie disease. StatPearls. Retrieved on Apr. 14, 2026 from https://www.ncbi.nlm.nih.gov/books/NBK560628/

  • Schmidt, M. H. & Schmidt, H. S. (2004). Sleep-related erections: Neural mechanisms and clinical significance. Current Neurology and Neuroscience Reports, 4(2), 170–178. doi: 10.1007/s11910-004-0033-5. Retrieved from https://pubmed.ncbi.nlm.nih.gov/14984691/

  • Waldinger, M. D., Quinn, P., Dilleen, M., et al. (2005). A multinational population survey of intravaginal ejaculation latency time. Journal of Sexual Medicine, 2(4), 492–497. doi: 10.1111/j.1743-6109.2005.00070.x. Retrieved from https://pubmed.ncbi.nlm.nih.gov/16422843/

  • Wang, Y., Zhang, J., & Li, H. (2021). Narrative review: pathogenesis, diagnosis, and treatment of sleep-related painful erection. Translational Andrology and Urology, 10(12), 4422–4430. doi: 10.21037/tau-21-1045. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC8749065/

  • Zhao, B., Hong, Z., Wei, Y., et al. (2019). Erectile dysfunction predicts cardiovascular events as an independent risk factor: a systematic review and meta-analysis. Journal of Sexual Medicine, 16(7), 1005–1017. doi: 10.1016/j.jsxm.2019.04.004. Retrieved from https://pubmed.ncbi.nlm.nih.gov/31104857/