The only way you can totally prevent trichomoniasis is to not have vaginal, anal, or oral sex -- but you can take some steps to lower your chances of getting it:
Always use latex condoms, and use them the right way. This helps, but won’t totally protect you because trich can infect areas that a condom doesn’t cover. Also, because you can get trich just through contact, make sure to put the condom on early, before it touches the vagina.
For women -- avoid douching. Your vagina has a natural balance of bacteria to keep you healthy. When you douche, you remove some of those helpful bacteria, which can raise your chances of getting an STD.
Stick with just one sex partner who’s been tested and doesn’t have any STDs. If that doesn’t work for you, think about limiting your number of sex partners.
Talk openly with your sex partners about your sexual histories and potential risk of infection. This can help you make the best choice for yourself.