What Makes a Penis Get Hard: How Erections Work

An erection happens when blood rapidly fills two sponge-like chambers inside the penis and gets trapped there under pressure. The process is driven by a chain of chemical signals that relax the muscles lining penile blood vessels, allowing blood to rush in. What seems simple on the surface actually involves your nervous system, hormones, and blood vessels working in precise coordination.

The Chemical Chain Reaction

The key player is nitric oxide, a signaling molecule released by nerves and blood vessel walls inside the penis. When you become aroused, nerve endings release nitric oxide into the surrounding tissue. This triggers the production of a second messenger molecule called cGMP, which tells the smooth muscle cells wrapped around penile arteries to relax. As those muscles loosen, the arteries widen and blood pours in.

Without cGMP, erections don’t happen. Research in animals that lack the protein activated by cGMP shows their penile tissue simply fails to relax, even when nitric oxide is present. The entire chain, from nitric oxide to cGMP to muscle relaxation, has to work in sequence.

What Happens Inside the Penis

The penis contains two cylindrical chambers called the corpora cavernosa, made of spongy tissue filled with tiny blood spaces. In a flaccid state, blood flow through these chambers sits around 9 ml per minute per 100 grams of tissue. During arousal, that blood flow jumps nearly fivefold to about 44 ml per minute. At the same time, overall pelvic arterial blood flow roughly triples, from 30 ml per minute to 87 ml per minute.

As blood floods in, something equally important happens on the way out: drainage gets cut off. The expanding spongy tissue compresses the veins that normally carry blood away from the penis. Blood flow in these outer drainage channels drops from about 22 ml per minute to just 8 ml per minute. This trapping mechanism is what builds pressure. Internal pressure rises from around 30 mm Hg at rest to over 100 mm Hg during a full erection, enough to produce rigidity.

Three Types of Erections

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

Psychogenic erections start in your brain. Visual input, sounds, fantasies, or memories of arousal send signals down the spinal cord from the upper lumbar region (roughly the middle of your back). These signals travel to the penis and kick off the nitric oxide cascade. This is the type of erection triggered by attraction, imagination, or watching something arousing.

Reflexogenic erections bypass the brain entirely. Direct physical touch to the genitals sends sensory signals through the pudendal nerve to an “erection center” in the lower spinal cord. Connector nerve cells there activate nearby parasympathetic neurons, which fire signals straight to penile blood vessels. This reflex arc is why erections can occur even during sleep or in people with certain spinal cord injuries above the lower spine.

Nocturnal erections happen during REM sleep, the phase associated with dreaming. Healthy men typically experience three to five erections per night, each lasting up to 20 or 30 minutes. These appear to be linked to shifts in nervous system activity during sleep cycles rather than to sexual dreams specifically.

How Testosterone Fits In

Testosterone doesn’t directly cause erections, but it keeps the whole system running properly. It regulates the production of the enzymes that generate nitric oxide in penile tissue. In animal studies, when testosterone is removed, nitric oxide production drops and the erectile response weakens. Restoring testosterone brings both the enzyme activity and erections back.

Interestingly, testosterone also maintains the enzyme that breaks down cGMP and ends an erection. This seems contradictory: why would the body upregulate both the “go” signal and the “stop” signal? The answer appears to be balance. Testosterone keeps the ratio of these two systems steady, so the penis can both achieve and resolve erections in a healthy cycle. When testosterone drops, both sides of the equation decline, and the tissue becomes less responsive overall rather than stuck in one state.

How an Erection Ends

An erection doesn’t just fade passively. A specific enzyme actively breaks down cGMP, the molecule keeping smooth muscles relaxed and blood trapped in the penis. Once cGMP levels fall, the smooth muscles contract again, arteries narrow, the veins reopen, and blood drains out. This is the normal resolution process and it’s the reason erections are temporary even during sustained arousal.

This enzyme is also the target of common erectile dysfunction medications. Those drugs work by slowing the breakdown of cGMP, which keeps blood in the penis longer and makes it easier to maintain an erection. They don’t create arousal or trigger an erection on their own. They simply extend the window once the nitric oxide signal has already fired.

What Affects Erection Quality

Because erections depend on blood vessel health, nerve function, and hormonal balance, problems in any of those systems can affect firmness. Clinicians grade erection quality on a simple four-point scale: grade 1 is some enlargement but no hardness, grade 2 is partially hard but not firm enough for penetration, grade 3 is firm enough for penetration but not fully rigid, and grade 4 is completely hard.

The most common factors that reduce erection quality tie directly back to the mechanisms above. Conditions that damage blood vessels (like diabetes, high blood pressure, and atherosclerosis) reduce the blood flow surge needed to fill the chambers. Nerve damage from surgery, injury, or chronic disease can interrupt the signals that release nitric oxide. Low testosterone weakens the enzymatic machinery. And psychological factors like anxiety or stress can suppress the brain’s arousal signals before they ever reach the spinal cord, short-circuiting psychogenic erections even when the physical hardware works fine.

Lifestyle factors matter too. Smoking damages the blood vessel lining that produces nitric oxide. Excess alcohol suppresses nervous system signaling. Regular cardiovascular exercise, on the other hand, improves the health of blood vessel walls and supports the nitric oxide pathway, which is why erectile function often tracks closely with overall cardiovascular fitness.