Bactrim is an antibiotic used to treat various bacterial infections, including urinary tract infections (UTIs), ear infections, bronchitis, traveler's diarrhea, shigellosis, and Pneumocystis jiroveci pneumonia. It contains sulfamethoxazole and trimethoprim, which work together to inhibit bacterial growth.