The types of HPV that raise your risk for cancer are spread through sexual contact with an infected partner. Correct usage of latex condoms greatly reduces the risk of catching or spreading HPV. Vaccines can protect against several types of HPV, including some that cause cancer.