Erythromycin is used to prevent and treat infections in many different parts of the body, including respiratory tract infections, skin infections, diphtheria, intestinal amebiasis, acute pelvic inflammatory disease, Legionnaire's disease, pertussis, and syphilis.