Sertraline (sold as Zoloft) is an SSRI antidepressant. It's FDA-approved for major depressive disorder, OCD, panic disorder, PTSD, social anxiety disorder, and premenstrual dysphoric disorder (PMDD).
SSRIs work by blocking the reabsorption of serotonin in the brain, leaving more of it available between nerve cells. That mechanism is the basis for their effect on mood and anxiety, though the full picture of why SSRIs help is still actively studied.