A condom is known to be one of the most effective ways of preventing HIV and other STDs as well.