Although the exact etymology of the word is debated, it comes originally from Náhuatl, the language of the Aztec culture.
Some propose it is derived from xicolatl, "beaten drink". Others say it comes from xocóatl, "bitter water".
What is certainly true is that many languages have adopted the word with small changes in its writing and pronunciation.