HIV (human immunodeficiency virus) is a virus that attacks the immune system. You can get HIV during sex (vaginal, anal, or oral sex) with someone who has it. You can get it if you're sexually assaulted. You can also get it if you share a needle, a syringe, or other drug equipment.