Herpes is caused by a virus called HSV or Herpes Simplex Virus. There are two types, HSV - 1 (oral herpes) & HSV - 2 (genital herpes.)
Sources:
https://www.mayoclinic.org/diseases-conditions/genital-herpes/symptoms-causes/syc-20356161
https://www.cdc.gov/std/herpes/stdfact-herpes.htm
https://my.clevelandclinic.org/health/diseases/4248-genital-herpes-hsv-2
https://www.healthline.com/health/std/genital-herpes#when-to-see-a-doctor