Despite medical advances, the mortality in infective endocarditis is today very high. Its clinical and epidemiological characteristics are changing over time, with more elderly patients affected, with more underlying comorbidities and with Staphylococci as the most frequent pathogen. Effective treatment in complicated cases needs a multidisciplinary approach, and surgery is necessary in 40-50% of cases. Since clinical trials are difficult to be conducted in infective endocarditis, the scientific evidence is weak. The main indications of surgical treatment are heart failure due to valvular regurgitation and uncontrolled infection because of periannular extension or difficult-to-treat micro-organisms. Prospective analysis has demonstrated that medical-surgical treatment is better than only medical treatment in complicated endocarditis with severe cardiac failure but mortality is still high with periannular extension. Prosthetic endocarditis has better prognosis with surgical treatment in the presence of complications and when the aetiology is S aureus. In patients without extensive non-hemorrhagic neurological lesions, early surgical intervention is safe. Mitral repair is nowadays an effective surgical technique when there is not extensive valve destruction, since replacement with a prosthetic valve has several problems like risk of infection, requirement for anticoagulation and durability. There is no evidence that the employment of homografts is better than aortic valve replacement, and the most important issue is the complete removal of the infected tissue. The pacemaker and defibrillator infection is best treated by removal of the device and the leads along with effective antibiotic therapy. Percutaneous lead extraction is the method of choice, and surgery is reserved only when there are contraindications or failure of the percutaneous techniques, large vegetations, and tricuspid regurgitation. Whenever is possible, tricuspid repair, is preferable, but replacement must be considered when there is a chance for recurrence after repair.