Treatment depends on the type of pathogen. Bacterial infections are often treated with antibiotics, while antiviral medications are used for viral infections. Antifungal and antiparasitic drugs are used for fungal and parasitic infections, respectively.