Viruses depend on the host cells that they infect to reproduce. When found outside of host cells, viruses exist as a protein coat or capsid, sometimes enclosed within a membrane. The capsid encloses either DNA or RNA which codes for the virus elements.
In order to contract HIV, infected bodily fluids have to enter your system. Considering this, having sexual intercourse without a condom would definitely put you at risk for HIV if your partner has it.