Treatment depends on the type of infection. Bacterial infections are typically treated with antibiotics, while antiviral medications are used for viral infections. Antifungal and antiparasitic medications are prescribed for fungal and parasitic infections, respectively. Supportive care, such as hydration and pain management, is also essential.