An erection is the physiological process where the penis becomes firm, engorged, and enlarged. This process typically occurs in response to sexual arousal but can also happen spontaneously. The primary mechanism involves increased blood flow into the penile tissues while the outflow is restricted.