HIV passes into semen as it makes its way through the host body. The higher the viral load, the more copies of the virus there are in an ejaculation, increasing the risk of infection of an HIV negative sex partner or partners should enough of the virus find a way past their bodies’ first line of defenses.
Small tears or abrasions in the delicate skin around the genitals, inside the vagina, or in the mucosa lining of the anus happen as a natural result of penetrative sex. Passing a high enough content of HIV into a compromised area of a partner’s body could introduce enough viral copies to get a foothold inside the bloodstream where it could either be successfully fought off by the new host’s immune system, or potentially survive and cause the person to seroconvert, which is to say they become infected with HIV and will soon produce enough antibodies to show up on an HIV test.
This is why barrier protection, such as dental dams and condoms have long been used as a common form of protection against HIV. When used properly, these latex barriers prevent the exchange of potentially infected body fluids, making the chances of transmitting HIV much lower. More recently, science has focused on preventing the virus from replicating, thereby diminishing the viral load in HIV+ patients so that they are undetectable, meaning there is not enough of the virus in their body to cause a new infection in an HIV negative partner or partners. This method of protection is called Treatment as Prevention (TasP) for HIV+ people, or Pre-Exposure Prophylaxis (PrEP) for HIV- people.