The penis gets erect during sexual stimulation when increased blood flows to the penis resulting from relaxation of penile arteries and corpus cavernosal smooth muscle. This is due to the release of nitric oxide (NO) from nerve terminals and endothelial cells which in turn leads to the synthesis of cGMP in smooth muscle cells.