Transmission of HIV almost always occurs through unprotected sex, or by sharing needles. If people think they have been exposed to the HIV virus they should get an HIV test.
The most commonly used test is a blood test that looks for antibodies to the virus. Antibodies are produced by the immune system to fight the virus. The "window period" is the time that it takes for the antibodies to develop after being exposed. Although many people develop antibodies within the first month of their infection, some people take a bit longer. Clinicians agree that testing at three months after exposure will give a conclusive result.
All pregnant women should be tested for HIV so they can be treated prenatally and greatly reduce the risk of transmitting HIV to their babies.
People can get tested for HIV by their regular doctor, or they can go to a health facility, or a clinic that specializes in sexual health. There is now a rapid blood test for HIV that requires only a few drops of blood and gives same day results. It is especially important to practice abstinence or safe sex and to avoid sharing needles during the window period in order to get an accurate HIV test result, and to avoid the risk of infecting another person since newly infected people are especially infectious to others.