You should only have unprotected sex if you're making an informed decision about the risks you're prepared to take because some STIs are with you for life and HIV, when it turns into AIDS, is fatal. You could be putting your health and the health of your partners at serious risk, so it's worth knowing what STIs are out there and what you can do to reduce the risks.
If you make an informed decision to have unprotected casual sex - and we would strongly advise you not to - there are a couple of things you can do to reduce the risks of catching the STI that people are most concerned about, namely HIV. By using lots of lubricant, not letting someone cum in you and by avoiding unprotected anal sex you can reduce the risks of getting HIV significantly. Also by having regular screens, (and if needed treatment) for common infections such as Chlamydia and gonorrhoea you can also further reduce the chance of picking up HIV as the presence of these infections appears to increase the infectivity of HIV should you be exposed to it.
Lubricant helps because it reduces the chances of damaging the skin or lining of the vagina, penis or anus when you're having vaginal or anal sex. The less damage there is, the harder it's going to be for the virus to pass into your bloodstream. With unprotected anal sex, in particular, you should use lots of lubricant as the lining of the anus is thin and easily damaged.
Because the anus lining is thin and easily damaged, the risks inherent in unprotected anal sex are huge. Not only is the anal lining liable to rip, but the anal lining is sufficiently thin and absorbent that even when it's not ripped, someone else's body fluids can be absorbed into your blood stream. That's why unprotected anal sex is such a common way to catch HIV.
Next don't let someone cum in you. This is important because even though HIV is present in a man's precum, you're much more likely to catch it when a man cums. That's because the same volume of cum will carry a higher concentration of HIV than precum and also there is simply a greater volume of bodily fluid when a man cums.
Finally get screened regularly for sexually acquired infections. Common infections such as Chlamydia lead to local inflammation of the affected skin/genital surface, making it easier for the HIV virus to get into your body.