This is one of the oldest informalities of the English language. In its Old English form, it occurs in the Anglo-Saxon Chronicle. The "X" stands for the Greek letter chi, the initial in the name Xristos (Khristos equals Christ).
In Latin manuscripts, Christus was often abbreviated by using the first two letters of Greek Christos, chi (X) and rho (P). This abbreviation is prominent, for example, on the chi-rho pages of early medieval illuminated manuscripts like The Book of Kells and The Lindisfarne Gospels. When chi and rho are superimposed upon each other a symbol for Christ is formed which has had wide usage through the centuries of the Christian era. This symbol is known variously as a Chi-Rho, chrismon, or Christogram.
The name Jesus presented another confusing symbol in similar fashion. The first three letters of the Greek version of the name were written in Greek capitals as "IHS" (iota eta sigma). Greek sigma corresponds to Latin "s", and the monogram was Latinized as "IHS" The Greek "H" is the origin of the written Latin character and was allowed to remain in this now somewhat mysterious symbol still used by Christians today.
The IHS is supposed to be the Greek abbreviation of the Greek name Iesous, i.e., "Jesus". It does not mean: Iesous, Hyios, Soter (Jesus, Son, Savior); Iesus, Hominum Salvator (Jesus, Savior of Men); nor In hoc signo (vinces), "In this sign thou shalt conquer."
The words In hoc signo vinces ("In this sign thou shalt conquer") were used by Emperor Constantine who had them painted on his standard as he went on to victory after having a vision of a cross appearing in the sky with those words.
Some authorities advise that Xmas or X-mas not be used in writing. There are many who consider it to be in bad taste; that is, commercial and offensive to Christianity (and Christians). This feeling may have come from a confusion of "X" in the sense of "Christ" with "X" meaning "an unknown person or quantity".
Despite its historical origin, many see no justification for not writing the complete word: Christmas!