Today, more tools than ever are available to prevent HIV. You can use strategies such as abstinence (not having sex), limiting your number of sexual partners, never sharing needles, and using condoms the right way every time you have sex. You may also be able to take advantage of newer HIV prevention medicines such as pre-exposure prophylaxis (PrEP) and post-exposure prophylaxis (PEP).
If you have HIV, there are many actions you can take to prevent transmitting it to others. The most important is taking HIV medicine (called antiretroviral therapy, or ART) as prescribed. If you take HIV medicine as prescribed and get and keep an undetectable viral load (or stay virally suppressed), you can stay healthy and have effectively no risk of transmitting HIV to an HIV-negative sex partner.