Fear of not getting it up (impotence) is among the greatest of all male fears. Cultural expectation that a "real" man must be able to have penetrative sex at any time puts tremendous performance pressure on men and their penis. The truth is that up to 90% of men struggled with their erection by the time they are 40 years old.
For most men under 50 ED is caused primarily by psychological or relationship issues. Common physical causes of ED include alcohol abuse, diabetes, prostate surgery, medications, spinal cord injury and chronic illness. After 50 hormonal, vascular and neurological systems function less efficiently and therefore occasional ED is not uncommon. In all cases, anticipatory and performance anxiety exacerbates symptoms and creates a self fulfilling negative cycle.
Treatment involves individual and couples therapy, and when necessary, coordination with a medical provider.