The penis contains two cylinder-shaped, spongelike structures called the corpora cavernosa. During sexual arousal, nerve impulses increase blood flow to both cylinders. This sudden influx of blood causes an erection by expanding, straightening and stiffening the penis.