Antibiotics can treat STIs caused by bacteria or parasites. There is no cure for STIs caused by viruses, but medicines can often help with the symptoms and lower your risk of spreading the infection.
Correct usage of latex condoms greatly reduces, but does not completely eliminate, the risk of catching or spreading STIs. The most reliable way to avoid infection is to not have anal, vaginal, or oral sex.
There are vaccines to prevent HPV and hepatitis B.