There is actually no test for the presence of the HIV virus. The only test that's ever been available tests only for the antigens for the HIV virus, meaning that you were exposed at one time and created antibodies, but the virus may have been destroyed and is no longer in you.
Originally Posted by honorable1
I believe you mean, "The only test that's ever been available tests only for the antiBODIES..."
There are tests for antibodies, antigens, and nucleic acid tests (NAT).
Antibody tests show antibodies, which are your body's response to an infection. Antigen tests and NAT detect the virus itself. Routine screening is probably going to be an antibody test. Donated blood gets a NAT test. NAT has replaced antigen tests in most cases.
All versions of the tests have some "window" period between exposure and test date when the tests may be negative even if you're infected. The longer between exposure and test, the less likely a false negative will be.
Wikipedia has a pretty good article.
http://en.wikipedia.org/wiki/HIV_test