How Do People Get Hard? The Physiology Explained

An erection happens when blood rapidly fills two sponge-like chambers inside the penis and gets trapped there under pressure. The process is a chain reaction involving your brain, spinal cord, nerves, blood vessels, and hormones, all working together in a specific sequence. It can be triggered by sexual thoughts, physical touch, or both at the same time.

Two Ways an Erection Starts

Your body has two distinct pathways for triggering an erection, and they operate through different parts of the spinal cord.

A psychogenic erection starts in the brain. Visual cues, sounds, memories, or fantasy generate arousal signals that travel down through the spinal cord at the mid-to-lower back level (T11 through L2). This is the type of erection that can happen without any physical contact at all.

A reflexogenic erection is the body’s direct response to physical stimulation of the genitals. Sensory information from touch travels through the dorsal nerve of the penis (a branch of the pudendal nerve) to a lower section of the spinal cord (S2 through S4). From there, the signal loops back out to the blood vessels of the penis without needing input from the brain. This is why erections can occur during sleep or even in people with certain spinal cord injuries.

In most real-world situations, both pathways are active at the same time. Your brain is processing arousal while your body is responding to physical sensation, and the two signals reinforce each other.

The Chemical Chain Reaction

Once those nerve signals reach the penis, the actual mechanical process comes down to one key molecule: nitric oxide. Nerve endings and blood vessel walls in the penis release nitric oxide, which kicks off a chemical cascade. Nitric oxide activates an enzyme that produces a signaling molecule called cGMP. That molecule is the direct trigger that causes the smooth muscle tissue inside the penis to relax and open up.

This matters because in its resting state, the smooth muscle inside the penis is contracted, keeping the blood vessels narrow and blood flow minimal. When cGMP builds up, those muscles relax, the small arteries widen, and blood rushes in. The entire shift from flaccid to erect depends on this relaxation step. Without it, no amount of arousal produces a physical erection, which is exactly why medications for erectile dysfunction work by protecting cGMP from being broken down too quickly.

How Blood Gets Trapped

The penis contains two cylindrical chambers called the corpora cavernosa, running side by side along its length. These chambers are made of connective tissue, collagen, elastin, and smooth muscle, with internal support structures (sometimes called pillars or struts) that help maintain shape under pressure. A tough outer sheath called the tunica albuginea wraps around each chamber like a casing.

When the smooth muscle relaxes and blood flows in, these spongy chambers expand. As they swell, they compress the veins that would normally drain blood back out of the penis. This creates a hydraulic trap: blood pours in through the arteries but can’t escape through the veins. The result is increasing internal pressure and rigidity. Normal erectile function depends on maximizing blood inflow while minimizing outflow. If either side of that equation fails, the erection is weaker or doesn’t happen.

Where Testosterone Fits In

Testosterone plays a supporting role rather than a direct one. Its most reliable effect is on sexual desire. When testosterone drops significantly, libido tends to decline, which means fewer arousal signals from the brain and fewer erections as a result.

But testosterone also appears to have a more hands-on role in the hardware itself. Animal research has shown that low testosterone reduces nitric oxide production in the penis by roughly 45%, and restoring testosterone levels prevents that drop. So testosterone helps maintain the chemical machinery that makes erections physically possible, not just the motivation to have them.

That said, the relationship isn’t perfectly linear. Studies giving varying doses of testosterone to healthy young men with normal levels haven’t consistently shown changes in sexual desire. The hormone seems to matter most when levels fall below a functional threshold rather than acting as a “more is better” dial.

What Changes With Age

Erections work the same way at every age, but the system gradually becomes less efficient. Blood vessels stiffen, smooth muscle in the penis is slowly replaced by less flexible connective tissue, and nerve signaling can weaken. The net effect is that erections may take longer to develop, require more direct stimulation, and feel less firm.

Sexual function tends to shift most noticeably around age 40. The refractory period (the recovery window after orgasm before another erection is possible) also lengthens with age. A younger person might recover in minutes, while someone in their 50s, 60s, or beyond may need 12 to 24 hours. There’s no universal number here because overall health, cardiovascular fitness, and individual biology all play a role.

Common Reasons the Process Breaks Down

Because erections require coordination between nerves, blood vessels, hormones, and psychological arousal, a problem at any point in the chain can interfere. The most common physical cause is poor blood flow, often related to the same cardiovascular issues that affect the heart: high blood pressure, high cholesterol, diabetes, and smoking. The arteries supplying the penis are small, so they tend to show the effects of vascular damage before larger arteries elsewhere in the body.

Psychological factors are just as real and just as common. Anxiety, stress, depression, and performance pressure can suppress the brain’s arousal signals or trigger a competing “fight or flight” response that constricts blood vessels instead of relaxing them. This is why someone might have normal erections during sleep (when the reflexive pathway operates on its own) but struggle during sex.

Nerve damage from surgery, injury, or conditions like diabetes can disrupt signaling between the brain, spinal cord, and penis. Certain medications, particularly some antidepressants and blood pressure drugs, can interfere with the chemical steps involved. And significant drops in testosterone, whether from aging, medical conditions, or other causes, can reduce both desire and the physical capacity for erections.