Anatomy of an Erection
At its most basic level, an erection is a matter of hydraulics. Blood fills the penis, causing it to swell and become firm. But getting to that stage requires extraordinary orchestration of body mechanisms. Blood vessels, nerves, hormones, and, of course, the psyche must work together. Problems with any one of these elements can diminish the quality of an erection or prevent it from happening altogether.
In many cases, an erection really starts in a man's brain. A sight, a touch, a smell, or perhaps just a memory sparks intense activity in the hypothalamus, an area near the base of the brain. Electrical signals of sexual arousal travel from the brain down to an area in the lower part of the spinal cord. Nerves in this area signal nerves in the pelvis, which tell arteries to let blood into the penis and cause an erection.
Direct genital stimulation can also cause an erection, but different nerve pathways are involved. In this case, the sensation is carried by the pudendal nerve, which runs from the penis to the sacral nerves in the lower spine. The sacral nerves then send messages that cause the arteries in the penis to admit blood.
See, I told you it was interesting!
Source: AOL Health
