Erectile dysfunction (ED) is the inability to get or keep an erection firm enough for sexual function. It’s a common sexual problem, affecting as many as 30 million men in the United States. Most cases of ED have a physical cause, such as heart disease, diabetes, and obesity. Lifestyle choices like smoking and drinking excessive amounts of alcohol can also lead to ED. But for some men, psychological issues are the root of the problem.