If you have had sex with an HIV-positive person whose viral load is not below the detection limit (what is that) and the condom broke or was suddenly gone, so you were at risk of infection, you have the option of taking post-exposure prophylaxis, called PEP.
PEP must be started as soon as possible after HIV risk. Preferably within two hours, otherwise preferably within 24 hours, at the latest after 48 hours. Whether PEP can still be useful up to 72 hours (three days) after the accident is controversial.