Yes.
There are oral herpes (like cold sores) and genital herpes. Both can be transmitted by any form of touch. So oral herpes can be spread by kissing, sharing chapstick or drinking glasses, or even just touching someone's lips and then accidently touching your own.
Genital herpes are the same way, you can get infected through sex, or just touching an infected area and then touching yourself.
The two can mix too, meaning you can catch genital herpes through oral sex. Though they are caused by different forms of the virus so it's not as common for that to happen. And herpes is a life long virus. Even when treated, if it goes away, there is always the likelihood that it will return.