An HIV test is a medical test used to diagnose the presence of the human immunodeficiency virus (HIV) in a person's body. HIV is the virus that causes acquired immunodeficiency syndrome (AIDS), a condition that weakens the immune system, making it harder for the body to fight off infections and diseases.