In the shaft of the penis there are two side-by-side chambers of spongy tissue called the corpora cavernosa. They're mainly responsible for erections. Just below them is another chamber called the corpus spongiosum. The urethra, which carries semen and urine, runs through the center of it.
The corpora cavernosa are made of small arteries and veins, smooth muscle fiber, and empty spaces. The chambers are wrapped in a sheath of thin tissue.
When you get an erection, signals from the brain or nerve endings in the penis cause the smooth muscle of the chambers to relax and arteries to dilate, or open wider. This allows a rush of blood to fill the empty spaces.
The pressure of blood flow causes the sheath of tissue around the chambers to press on veins that normally drain blood out of the penis. That traps blood in the penis. As more blood flows in, the penis expands and stiffens, and you have an erection.
When the excitement ends, the smooth muscle contracts again, taking pressure off the veins and allowing blood to flow back out of the penis. Then the penis returns to a flaccid state.
High Blood Pressure and Other Causes of Erectile Dysfunction
High blood pressure keeps the arteries that carry blood into the penis from dilating the way they're supposed to. It also makes the smooth muscle in the penis lose its ability to relax. As a result, not enough blood flows into the penis to make it erect.