The Oxford English Dictionary's definition for the letter X says it can be "used to represent a kiss, esp. in the subscription to a letter." These days, that doesn't just include letters and notes. We sign off our text messages, emails, and event comments on social media sites with X's.
The OED's earliest recorded reference of using the letter X as a kiss dates back to 1763 in a letter from the naturalist Gilbert White. In 1894, Winston Churchill also sent kisses in a letter: "Please excuse bad writings as I am in an awful hurry. (Many kisses) xxx WSC."
There are many theories as to why the letter X was used as a kiss in the first place, including the X looking like puckered lips.
The professor of anthropology at the University of Toronto, Marcel Danesi, had a much more involved theory on the tradition:
"The X has always been a Christian symbol, and it is the first Greek letter in the name of Christ. As far as I can tell, official letters in the medieval period and even after were literally sealed with the X, sealed with a kiss of faith, I guess."
Danesi also included that illiterate people used to sign documents with the X. It was customary for them to plant a physical kiss on the X.
"From this domain, the X jumped into another domain, also to signify kissing but a different kind of kissing - romantic, rather than religious. At some point, this became a symbolic practice among everyone."
This shift from religious to secular meaning seems to parallel the shift to secularism in the Renaissance. But Danesi is quick to say that this is all speculative. "But if you look at the historical documents, it seems like a plausible scenario," he states.
So if X means "kiss," why does O mean "hug"? Said to be a North American invention, this seems to have a relatively simple reason. X's and O's go together (as in tic-tac-toe, or naughts and crosses) and an O looks like circled arms creating a hug.