Erection occurs when the blood flow to the penis increases when a man becomes sexually aroused.
Blood vessels going to the penis dilate, and blood fills the penis causing it to become engorged. This will typically last until arousal is diminished, or orgasm is achieved. Many conditions can affect erection, especially conditions that can compromise blood flow to the penis. These include physical conditions such as diabetes and vascular disease. Psychological conditions may also have a bearing on the initiation and maintenance of an erection.