An expansion to the .mod format of tracked music. In addition to the normal features of .mods, .XM files support 16 bit samples, additional channels, and instruments, which can have more than one sample associated with them. The different samples then play depending upon which note is desired. This is good, because while a sample recorded at a given pitch will usually sound fine at other similar pitches, problems tend to crop up with samples played at multiple octaves from where they were recorded. Instruments can also have such things as volume and panning envelopes, which change the volume or panning (does the note play louder through the left or right speaker?) of a note as it plays. As opposed to the later .it format, however, instruments created under .xm can not share samples. If you want multiple instruments to include the same sample, the sample must be duplicated for each instrument.
The first program to use the .xm format was Fast Tracker 2. By now, others abound, and the newer .it format can do more anyway.