Herpes, like HPV, is transmitted via touch. It's not like other STI's like gonorhea and HIV that require fluid exchange to transmit. As a result, both are very prevalent among sexually active adults.
Condoms or other barriers help, as does simple washing of hands and other parts. There are also various strategies for avoiding transmission from one partner to another, like suppressvie drugs for herpes. Fulloflove makes a nice point on that. But nothing other than complete and total abstinence (no kissing ever!) eliminates the risk. If you have ever had a cold sore, then you already have herpes (HSV-1 probably). Chicken pox and shingles are also herpes viruses as well.
Herpes is a very serious possible complication for a pregnant woman, as SC noted in her post. And some strains of HPV can cause cervical cancer (and very rarely other cancers in men and women). But most of the time, herpes and HPV do not result in any serious health concerns for most people. Most of the time, for most people, the risks are relatively minor. You, of course, will need to make your own assessment of what risks you are willing to take. But know that the stigma is almost always worse than the actual health concerns for most people, most of the time.