PEP is given to prevent HIV after a possible exposure. It is the use of antiretroviral medication to prevent HIV infection in an HIV-negative person who has had a specific high-risk exposure to
PrEP protects you against HIV but not against other sexually transmitted diseases as STD’s.
The sooner you start PEP, the better. Every hour counts. PEP is not a substitute for regular use of other HIV prevention. PEP is not the right choice for people who may be exposed to HIV frequently. PEP is not recommended after 72 hours of exposure.
PEP was first attempted for HIV prevention in the 1980s among health care workers who experienced occupational exposures.
Source/ CDC: https://www.cdc.gov/hiv/clinicians/prevention/prescribe-pep.html CDC has comprehensive guidelines for prescribing PEP.