The treatment of STIs depends on the specific infection. Bacterial STIs like chlamydia and gonorrhea are typically treated with antibiotics. Viral STIs, such as herpes and HIV, require antiviral medications. Early diagnosis and treatment are critical to preventing complications and reducing transmission.