Herpes is a viral infection caused by the herpes simplex virus 1 (HSV-1) and herpes simplex virus 2 (HSV-2). The World Health Organization estimates 3.7 billion people younger than 50 years old are infected with HSV-1 globally, while 491 million people younger than 50 have HSV-2. Both viruses are abundant in infected individuals' bodily fluids, such as saliva, semen and vaginal secretions.
HSV-1, the more prevalent virus, is primarily transmitted orally and is most responsible for oral herpes, which manifests commonly as cold sores around the mouth. HSV-1 can also cause genital herpes when the virus is passed through oral-to-genital transmission during oral sex. However, genital herpes is more likely to be transmitted through HSV-2. HSV-2 is more likely to recur than HSV-1 and can be transmitted to others even without the presence of an open sore, and that makes it much more easily passed on as it's difficult to know if you're infectious or not.
HSV transmits more easily from men to women, which may be part of the answer as to why more women have herpes than men. Herpes is also more common among young people, potentially (but not definitely) because they have more partners and are less likely to use condoms. Immunosuppressed people are understandably more at risk for infection.