How an erection occurs and is maintained

An erection begins with some form of arousal stimulus (physical, emotional, or cognitive). The brain produces a chemical that tells the body to increase the blood vessels bringing blood to the penis and decrease the vessels taking blood away. As the smooth muscles of the corpora cavernosa relax, the blood entering the penis through the cavernous artery fills all the space created through this relaxation of erectile tissue. The urethra gets closed off with this expansion of corpora cavernosa so that urination doesn’t take place. The penis becomes erect. The tunica albuginea ensures that the blood does not flow out of the penis so that an erection can be maintained.  The erection abates when the muscles contract, reducing the flow of blood into the penis and increasing the blood leaving the penis.