Although not proven, it is likely that erectile dysfunction can be prevented by good general health, paying particular attention to body weight, exercise, and cigarette smoking. For example, heart disease and diabetes are problems that can cause erectile dysfunction, and both are preventable through lifestyle changes such as sensible eating and regular exercise. Furthermore, early diagnosis and treatment of associated conditions like diabetes, hypertension and high cholesterol may prevent or delay erectile dysfunction, or stop the erectile dysfunction from getting more serious.
Exercise and lifestyle modifications may improve erectile function. Weight loss may help by decreasing inflammation, increasing testosterone, and improving self-esteem. Patients should be educated to increase activity, reduce weight, and stop smoking, as these efforts can improve or restore erectile function in men without comorbidities. Precise glycemic control in diabetic patients and pharmacologic treatment of hypertension may be important in preventing or reducing sexual dysfunction. 
ED is defined as the inability to achieve a full erection or the inability to maintain an erection adequate for sexual intimacy. Other types of sexual dysfunction such as premature ejaculation and low libido may occur; however, the most common and disruptive problem in men is ED. Although most men will experience periodic episodes of ED, these episodes tend to become more frequent with advancing age.
Remember those cultural messages we discussed earlier, about how men are wild sex aliens from the planet Weenus? Well, men are raised hearing those messages, too, and they can end up screwing with their sexual self-image —for instance, they can lead men to obsess over their own virility, and panic about impressing a new partner, until they've thought their boner into a corner and can't get an erection. Performance anxiety is one of the most common culprits behind lost erections, especially among younger, less experienced men.
ED may occur with or without other sexual dysfunction, including decreased libido (decreased interest in sexual activity), orgasmic dysfunction (troubles achieving an orgasm/climax), and ejaculatory dysfunction (problems with the fluid released during sex, including lack of ejaculation [anejaculation], small volume ejaculate, ejaculation that occurs too quickly [premature ejaculation], ejaculate that goes backward into the bladder [retrograde ejaculation] and pain with ejaculation).
Sexual dysfunction and ED become more common as men age. The percentage of complete ED increases from 5% to 15% as age increases from 40 to 70 years. But this does not mean growing older is the end of your sex life. ED can be treated at any age. Also, ED may be more common in Hispanic men and in those with a history of diabetes, obesity, smoking, and hypertension. Research shows that African-American men sought medical care for ED twice the rate of other racial groups.