Chlamydia is caused by bacteria that can live in vaginal fluid and in semen. You can get it by having sex or sexual contact with someone who is infected. Babies born to mothers with a chlamydia infection can also become infected.