The HPV vaccine is highly effective in preventing infection with the types of HPV that most commonly cause cancer and genital warts. Studies have shown that the vaccine can reduce the incidence of cervical cancer by up to 90% when given before exposure to the virus. It also provides strong protection against other types of cancers related to HPV, such as anal cancer and penile cancer.