The inability to maintain an erection while having sex haunts men more than anything else and half the questions we receive on our Q&A section ask for tips to deal with this condition. Technically speaking, an erection is caused due to the hydraulic effect of blood entering and being retained in spongy bodies within the penis. In most males, this happens when they're sexually aroused thanks to signals transmitted from the brain to nerves in the penis. Both the brain (to send a signal) and the heart (to pump blood to the penis) must work properly to get and maintain an erection. ED occurs whenever any of the proceedings are disrupted.