Erectile dysfunction (ED) is one of the complications associated with pelvic surgery. The significance of ED as a complication following pelvic surgery, especially radical prostatectomy (RP), lies in the negative impact that it has on patients' sexual and overall life. In the literature, rates of ED following RP range from 25% to 100%. Such variety is associated with pelvic dissection and conservation of neurovascular structures. Another important factor impacting on postoperative ED is the preoperative erectile function of the patient. Advances in the knowledge of pelvic anatomy and pathological mechanisms led to a refinement of pelvic surgical techniques, with attention to the main structures that if damaged compromise erectile function. These improvements resulted in lower postoperative ED rates and better erectile recovery, especially in patients undergoing RP. Furthermore, surgery alone is not sufficient to prevent this complication, and thus, several medical strategies have been tested with the aim of maximizing erectile function recovery. Indeed it seems that prevention of postoperative ED must be addressed by a multimodal approach. The aim of this review is to give a picture of recent knowledge, novel techniques and therapeutic approaches in order to reach the best combination of treatments to reduce the rate of ED after pelvic surgery.