Not having sex is the best way to protect yourself form contracting a STD (sexually transmitted disease).
Having sex with only one uninfected partner who only has sex with you is also safe.
Talk to your partner about past sex partners.
Use a latex condom. Condoms will help protect you from most STD’s.
Injection drug users should not share needles. There are syringe exchanges in most areas where you can obtain clean needles.