You can prevent HPV and other STDs by using a condom every time you have vaginal, anal or oral sex, although HPV and herpes can still be passed on if the condom does not cover the infected area. If you share sex toys, wash them after use and put a condom on them.
Do not have sex if you are experiencing an outbreak of herpes.
The HPV vaccine offers protection from a number of different types of HPV. However it will not protect you from every strain of the virus, so even if you have been vaccinated, you should still attend your regular cervical screening appointments.