Medications vary in how they are taken, when they begin to work and how long their effect lasts. There are also differences in their side effects. Your health care provider will tell you when to take your ED medication and how long its effects can last.