An erection is the stiffening and rising of the penis, which occurs during sexual arousal, though it can also happen in non-sexual situations. The primary physiological mechanism that brings about erection is the autonomic dilation of arteries supplying blood to the penis, which allows more blood to fill the three spongy erectile tissue chambers in the penis, causing it to lengthen and stiffen. The now-engorged erectile tissue presses against and constricts the veins that carry blood away from the penis. More blood enters than leaves the penis until an equilibrium is reached where an equal volume of blood flows into the dilated arteries and out of the constricted veins; a constant erectile size is achieved at this equilibrium.
Erection facilitates sexual intercourse though it is not essential for various other sexual activities. Although many erect penises point upwards (see illustration), it is common and normal for the erect penis to point nearly vertically upwards or nearly vertically downwards or even horizontally straightforward, all depending on the tension of the suspensory ligament that holds it in position. Stiffness or erectile angle can vary.