Blog
/
Sex

What Is an Erection and How Do They Work?

Kristin Hall, FNP

An erection is a physiological process in which your penis hardens and becomes larger, usually in response to some type of sexual stimulation. 

Getting an erection might seem simple. However, it’s actually a complicated behind-the-scenes process that involves numerous local nerves around your penis, your brain and the complicated network of blood vessels that runs throughout your body. 

The good news is that understanding how erections work isn’t that difficult. In fact, you can learn the basics of “what is an erection 101” in just a few minutes.

Below, we’ve explained what erections are, as well as how your body develops an erection (and just as importantly, gets rid of it again) when you feel sexually aroused.

We’ve also discussed erectile dysfunction (ED) and the factors that may prevent you from being able to properly get or maintain an erection. 

Finally, we’ve shared some treatment options that you may want to consider if you find it difficult to get or maintain a firm erection when you want to have sex.

What is an erection and how do they work

How Does An Erection Happen?

Maybe you call it “getting hard,” “engorgement” or “penile tumescence.” In any case, erections are a natural response that occurs when you feel sexually aroused. Erections usually begin with either mental or physical stimulation, which triggers a multi-step internal process involving the nervous system and cardiovascular system.

As you feel sexually stimulated, nerves located inside your penis — known as cavernous nerves — release natural chemicals called neurotransmitters. Your body uses neurotransmitters to communicate with different nerve cells.

The neurotransmitters released by your penis and surrounding nerves cause the smooth muscle of your blood vessels to relax. This widens the diameter of your blood vessels and increases the supply of blood to erectile tissue inside your penis, called the corpora cavernosa. At that point, your penis is still in a flaccid state, but these signals and the blood flow continue to increase. 

ED treatment

Hard facts on better erections

What Is an Erection?: How an Erection Works

From the beginning of blood flow, your erection is entering a cycle. As the blood vessels that supply your penis increase in size, so does blood flow. The erection, then, happens when that blood gets trapped and fills the tissues.

During the process of getting an erection, blood flow to your penis increases to 20 to 40 times its normal level. Blood pressure inside your penis also spikes when it’s erect, with the average man showing a blood pressure level of roughly 100 mmHg (millimeters of mercury).

This elevated blood flow is what gives your erection its size and firmness, allowing you to have penetrative sex with your partner.

To trap the extra blood inside your penis and help you maintain your erection during sex, a fibrous tissue called the tunica albuginea that surrounds the corpora cavernosa compresses it.

This prevents blood from flowing out of your penis until you’re either no longer aroused or have reached orgasm and ejaculated.

What Happens at the End of My Erection?

During sex, your penis usually stays in a “rigid erection” phase. Following ejaculation, or when you no longer feel sexually aroused, it enters a new phase in which the veins increase in size, allowing blood to flow out from your penis.

This outward flow of blood gradually reduces pressure inside your penis, making it decrease in size and become less firm. 

All of this — from the sudden increase in blood flow and firmness to the reverse process after you reach orgasm and ejaculate — happens behind the scenes, allowing you to focus on the moment and enjoy sex.

As much as some guys might want to stay hard for a longer time, maintaining an erection forever can put lots of pressure on penile tissue and potentially harm the internal erectile tissue.

In fact, a specific health issue called priapism — a painful, prolonged erection — can potentially lead to permanent erectile dysfunction when left untreated.

Luckily, your body also has its own internal mechanism for getting rid of erections when you no longer need them.

What Is Erection Dysfunction or Erectile Dysfunction?

Erectile dysfunction means you can’t get or maintain a penile erection firm enough to have satisfying sex with your partner. It’s a common issue affecting an estimated 30 million men in the United States every year.

The symptoms of ED can vary in severity. Some men with erectile dysfunction find it impossible — or at least very difficult — to get an erection at any time. Others might be able to get an erection in some circumstances, but not in others.

And then some guys with ED might be able to get an erection but find it difficult to maintain it long enough or keep a sufficient level of firmness to have sexual intercourse.

So, if erections are all about a combination of sexual stimulation and consistent blood flow, what causes erectile dysfunction is clearly an interruption of that process. But what interrupts the process? Get answers below.

Why Erections Don’t Happen

Most of the time, erectile dysfunction occurs when something prevents you from feeling sexually aroused — or when a physical health issue affects blood flow to your penis or nerve function in the surrounding area.

For example, several common causes of erectile dysfunction are physical health issues that can affect major blood vessels, such as:

  • Heart disease (cardiovascular disease)

  • Atherosclerosis (clogged arteries)

  • Hypertension (high blood pressure)

  • Low testosterone

  • Diabetes

Other medical conditions can also cause erectile dysfunction, including those that result in damage to the somatic nerves and dorsal nerves of the penis. Any impairment of nerve function or the spinal cord can affect communication between your penis and the rest of your nervous system.

Medications used to treat certain medical conditions — like antidepressants, appetite suppressants, antiandrogens (drugs that affect testosterone levels), high blood pressure medicines and sedatives — may also cause or contribute to ED.

ED is a known symptom of depression, anxiety (especially sexual performance anxiety) and chronic stress. Even issues such as feelings of guilt about sex or low self-esteem can mess with arousal and make it harder to get or maintain an erection.

How to Treat ED and Get Better Erections

The good news is that erectile dysfunction is almost always treatable. Treatment can involve making certain changes to your lifestyle, using medication, taking part in therapy or a combination of approaches.

Let’s go over options for improving erectile function, sexual performance and overall well-being.

Maintain Good Habits and a Healthy Lifestyle

The first step in treating ED and improving erections is to live a healthy lifestyle free of issues that can affect sexual arousal, nerve function or blood flow to your penis. This means maintaining healthy habits.

Try to:

  • Eat a balanced diet. Aim to eat nutritious meals with fresh fruits and vegetables, complex carbohydrates and lean sources of protein. Try to limit overly salty or sugary foods, as these may contribute to high blood pressure or diabetes.

  • Limit alcohol intake. Drinking can cause “whiskey dick,” also known as alcohol-induced ED. It’s okay to sip and cheers in moderation, but drinking to excess could increase your risk of developing erectile dysfunction.

  • Stay physically active. Regular physical activity can improve blood flow and reduce your risk of developing vascular disease. Try to exercise for at least 30 minutes most days, even if it’s just a brisk walk or bike ride.

  • Consider weight loss. Research suggests that having overweight or obesity increases your risk of ED. Try to maintain a healthy weight for better sexual functioning and overall health.
    If you smoke, quit. Smoking can elevate your risk of arterial disease, a significant risk factor for ED-. Our guide to smoking and erectile dysfunction goes into more detail about the impact cigarettes can have on sexual performance and solutions to help you kick the habit.

  • Avoid recreational drugs. Many illegal drugs don’t just affect your physical and mental health but also your erections. Even if you live in a state with legal recreational marijuana, avoid using it too frequently, as THC may affect sexual performance.

Our guide to naturally protecting your erections discusses other techniques for improving erections and preventing ED.

Treat Any Underlying Health Issues

If you have an existing medical condition that affects sexual arousal, blood flow or nerve function, treating it may help improve your erections and sexual performance.

Your healthcare provider may prescribe medication to treat your condition. If you currently use medication, they might adjust your dosage or suggest switching to a new medication that’s less likely to affect your sexual response.

You can connect with a licensed healthcare provider from home for many common issues with our online primary care services.

Consider Using Medication for ED

Several FDA-approved medications are available to treat erectile dysfunction. They belong to a class of drugs called PDE5 inhibitors and work by improving blood flow to the erectile tissue inside your penis.

ED medications include sildenafil (the active ingredient in Viagra®), tadalafil (generic for Cialis®), vardenafil (Levitra®) and avanafil (Stendra®).

We offer several ED medications online, following a consultation with a healthcare provider who’ll determine if a prescription is appropriate. You can also find out more about how these medications work in our guide to the most common ED treatments and drugs.

ED Treatment

Enjoy sex like you used to

Learn More About Healthy Erections and Sexual Function

As a man, being able to get healthy, consistent erections is a critical component of maintaining a satisfying sex life.

For guys Googling, “What’s an erection?” or “How does the penis work?” or “What does it mean to ‘get hard’?” there are simple answers — but also very complex ones.

Here’s what to keep in mind:

  • Unfortunately, getting an erection isn’t quite as easy as it should be for many guys.

  • This might be due to poor cardiovascular health, sexual performance anxiety or just a stressful lifestyle that makes staying sexually healthy difficult.

  • The good news is that almost all cases of erectile dysfunction are treatable with the right mix of healthy habits and, if necessary, erectile dysfunction medication.

Learn about the science behind erections in our list of surprising facts about erection health and ED.

You can also get online ED help with our range of evidence-based erectile dysfunction treatments

  1. Panchatsharam, P.K., Durland, J. & Zito, P.M. (2021, May 9). Physiology, Erection. StatPearls. Retrieved from https://www.ncbi.nlm.nih.gov/books/NBK513278/
  2. Silberman, M., Stormont, G. & Hu, E.W. (2022, February 8). Priapism. StatPearls. Retrieved from https://www.ncbi.nlm.nih.gov/books/NBK459178/
  3. Definition & Facts for Erectile Dysfunction. (2017, July). Retrieved from https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/definition-facts
  4. Symptoms & Causes of Erectile Dysfunction. (2017, July). Retrieved from https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/symptoms-causes
  5. Preventing Erectile Dysfunction. (2017, July). Retrieved from https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/prevention
  6. Bogdański, P., Skrypnik, D. & Musialik, K. (2014, February). ​Obesity—significant risk factor for erectile dysfunction in men. Polski Merkuriusz Lekarski : Organ Polskiego Towarzystwa Lekarskiego. 36 (212), 137-41. Retrieved from https://pubmed.ncbi.nlm.nih.gov/24720114/
  7. Erection problems. (2019, September 16). Retrieved from https://medlineplus.gov/ency/article/007617.htm
  8. Dhaliwal, A. & Gupta, M. (2021, June 25). PDE5 Inhibitors. StatPearls. Retrieved from https://www.ncbi.nlm.nih.gov/books/NBK549843/
Editorial Standards

Hims & Hers has strict sourcing guidelines to ensure our content is accurate and current. We rely on peer-reviewed studies, academic research institutions, and medical associations. We strive to use primary sources and refrain from using tertiary references. See a mistake? Let us know at blog@forhims.com!

This article is for informational purposes only and does not constitute medical advice. The information contained herein is not a substitute for and should never be relied upon for professional medical advice. Always talk to your doctor about the risks and benefits of any treatment. Learn more about our editorial standards here.