For many men, getting an erection is as simple as breathing. But it's an incredibly complex process involving a precise sequence of psychological and physiological events that can easily go wrong. Here's how erections work — and how science is helping millions of men keep it up.