STIs fall into two broad groups. Bacterial and parasitic infections - chlamydia, gonorrhoea, syphilis and trichomoniasis - are generally curable with the right course of treatment prescribed by a clinician. It is important to finish the full course, avoid sex until cleared, and ensure partners are treated to prevent reinfection.
Viral STIs behave differently. Genital herpes and HIV are lifelong but very manageable: herpes outbreaks can be reduced and HIV, with modern treatment, can be controlled so well that the virus becomes undetectable and untransmittable. Most HPV infections clear on their own, but some persist; the virus itself isn't cured, though warts and abnormal cell changes can be treated. Hepatitis C is now curable with newer medicines, while hepatitis B is usually managed long-term.
The right treatment depends entirely on the specific infection. Never attempt to self-treat - see a licensed doctor or pharmacist for diagnosis, the correct prescription and follow-up.