There are various treatments for erectile dysfunction depending on the cause. Your doctor will first determine the cause of your ED before prescribing a suitable treatment. It could be prescription medication, a surgical solution, a vacuum device, or a change in lifestyle.