Erectile dysfunction (ED) is a common condition that affects many men and their partners. It occurs when a man cannot get or maintain an erection firm enough for sex. There are often physical causes like heart disease or diabetes, but ED can also be caused by mental or relationship problems and concerns.