How do you get cold sores

Can you get them by sharing a drink with someone ??? Hours later before knowing they are forming one