You can get chlamydia during oral, vaginal, or anal sex with someone who has the infection. A woman can also pass chlamydia to her baby during childbirth. If you've had chlamydia and were treated in the past, you can get re-infected if you have unprotected sex with someone who has it.