A man gets an erection when the penis enlarges and stiffens.
It is a complex process that happens as a result of changes within the muscles, nerves and blood vessels of the penis.
The regulation of blood flow into and out of the penis is what makes an erection possible.
1. Specialized tissues in the shaft of the penis trap blood.
2. Following orgasm or the withdrawal of sexual stimulation, the process is reversed. Blood flows out of the penis and back into your circulation so the penis becomes soft.