They don't.
Latex condoms, when used consistently and correctly, are highly effective in preventing the sexual transmission of HIV, the virus that causes AIDS. In addition, consistent and correct use of latex condoms reduces the risk of other sexually transmitted diseases (STDs), including diseases transmitted by genital secretions, and to a lesser degree, genital ulcer diseases. Condom use may reduce the risk for genital human papillomavirus (HPV) infection and HPV-associated diseases, e.g., genital warts and cervical cancer.
Laboratory studies have demonstrated that latex condoms provide an essentially impermeable barrier to particles the size of STD pathogens.