If you have sex, the best way to prevent the spread of HPV is to use a latex condom every time. But remember that condoms and other barriers only protect the skin they cover. If you're with someone new, talk about HPV and other sexually transmitted infections before you have sex. If you're in a committed relationship and aren't currently using condoms, you may not need to change your habits. Talk to your partner and make a choice that feels right to both of you.
One of the best ways to prevent HPV is to make sure you have had the HPV vaccine. It may be given up to age 26 if it was not given earlier. If you are older than 27 and have not been vaccinated, talk with your doctor to see if you may need the vaccine. In some cases, it may be offered from ages 27 to 45.