Illustration of the anatomy of the penis. During an erection, blood enters the corpora cavernosa.
During an erection, more blood enters this sponge like space, causing the tunica albuginea to expand, and the penis to become longer, wider, and more rigid. Like all structures in the body, arteries bring blood (and oxygen) to the penis, and veins take the blood away. The penis, when flaccid (not hard) has blood inflow and blood outflow – blood entering the penis through arteries and leaving the penis through veins. During an erection, the blood enters the penis faster and the veins pinch off (occlude) causing the tunica albuginea to expand. In a way, the penis is like a sink with a faucet and drain. The faucet is always on (not full force) and the drain is open. An erection is in a way like turning up the flow from the faucet and plugging the drain.In simple terms, an erection happens because the brain tells nerves to release a substance in the penis. That substance then causes sponge like tissue of the tunica albuginea to change in a way that leads to more blood entering the penis and less blood leaving the penis, causing an erection. Often, patients with erectile dysfunction have a vascular impairment.