PrEP works by using antiretroviral medications to prevent the virus from establishing an infection in the body. The most commonly used drugs for PrEP are tenofovir and emtricitabine, which are combined in a single pill. These medications inhibit the virus's ability to replicate, thereby preventing it from spreading within the body.