When more blood flows inside the penis harder erections takes place. This occurs when the signals are transmitted through nerves based upon the signals from the brain and the spinal cord. These nerves are a part of the autonomous or involuntary nervous system.

When your body is sexually stimulated in the genital zone then impulses are sending to the upper areas of the brain through nerves and spinal cord. As soon as the impulses reaches the upper part of the brain it recognizes these as sexually arousing and send impulses down to the limbic system at the lower area of the brain.

The lower area of the brain produces the feelings of excitement and sends signals down the spinal cord to the genital area. The nerves which carry signals to the genital area are called Nervi erigentes. The signal triggers erection after reaching the penis and the rest of the genital zone.

Nitric oxide is released when the signals from the brain and the spinal cord reach the nerve ends in the penis and the genital zone. Nitric oxide spreads through the genital area and especially the penis to achieve harder erections by increasing blood flow to the penis.