The CDC recommends that everyone aged 13-64 get tested for HIV at least once as part of routine healthcare. If you are sexually active, you should talk to a health provider about how often you should get tested for HIV. A reasonable approach may include getting tested at least once a year.
In addition to testing, those with high risk factors look into a prescription for PrEP, or pre-exposure prophylaxis, which is medicine people at risk for HIV take to prevent getting HIV from sex or injection drug use. PrEP can stop HIV from taking hold and spreading throughout your body.
Currently, there are two FDA-approved daily oral medications for PrEP. A long-acting injectable form of PrEP has also been approved by the FDA. PrEP is highly effective at preventing HIV when taken as indicated.
In addition to reducing the risk of getting HIV from sex by about 99% when taken as prescribed, among people who inject drugs, PrEP reduces the risk by at least 74% when taken as prescribed.