When I was a kid I was taught that this was a disrespectful way to write Christmas, but it is simply a contraction–the X is the Greek letter chi which stands for Christ, the same way it does in the acrostic IXOYE. According to the Wiki, its use dates to at least the mid 1500s.