Yes, over time the immune system in some people can clear chlamydia infection, but most people need to take antibiotic medication to get rid of it. Untreated chlaymdia infection can cause serious health issues —such as sterility, pain, and pregnancy outside the womb. In addition, if you have chlaymdia, you can pass it on to your sex partners even if you don't have any symptoms. Getting re-infected with chlamydia after treatment is common, so be sure that your partners know about the infection and get treated too. Here's a great resource on how to talk to your partner about STIs: https://www.plannedparenthood.org/learn/stds-hiv-safer-sex/get-tested/how-do-i-talk-my-partner-about-std-testing.
We recommend that everyone diagnosed with chlamydia get a test 3 months after treatment to make sure you were not re-infected.