Under normal circumstances, when a man is sexually stimulated, his brain sends a message down the spinal cord and into the nerves of the penis. The nerve endings in the penis release chemical messengers, called neurotransmitters, that signal the corpora cavernosa (the two spongy rods of tissue that span the length of the penis) to relax and fill with blood. As they expand, the corpora cavernosa close off other veins that would normally drain blood from the penis. As the penis becomes engorged with blood, it enlarges and stiffens, causing an erection.
Impotence can have emotional causes, but most often it is due to a physical problem. The physical causes of impotence include diseases (such as diabetes and hypertension), injuries (such as prostate surgery), side-effects of drugs, and disorders (such as atherosclerosis).