The only 100% effective way to avoid getting an STD is by not having sex or sexual contact. If you do decide to have sex, your best bet is to have safe sex – using either a male or female condom, getting tested regularly and asking anyone you are getting physical with to do the same.
STIs/STDs can’t just come from nowhere. There is risk only when one person already has an STI/STD. And since most STIs/STDs don’t have symptoms, you can’t rely on what you see to tell you whether or not an infection is present. Play safe! Stay Safe!