To prevent STDs, one should use condoms during sex, avoid sharing personal items like towels and needles, practice good personal hygiene by washing before and after sex, get vaccinated for Hepatitis B, get tested if symptoms appear, avoid sex while under the influence of drugs or alcohol, and abstaining from sex completely is the only 100% effective way to prevent STDs.