This medication is a combination of two antibiotics: sulfamethoxazole and trimethoprim. It is used to treat a wide variety of bacterial infections. It is also used to prevent and treat a certain type of pneumonia. This medication should not be used by children less than 2 months of age due to the risk of serious side effects. This medication treats only certain types of infections. It will not work for viral infections. Unnecessary use or misuse of any antibiotic can lead to its decreased effectiveness.