REX files chop digital audio into "slices," each of which is associated with a MIDI note. Playing a MIDI note triggers its associated slice, which is why REX files can follow tempo variations—slices can trigger at a faster or slower rate as you speed up or slow down a MIDI sequence. However, what really makes this fun is that you can also re-arrange the MIDI notes in a different order to trigger slices at times other than their original timings, or transpose the notes to trigger a different slice than the one the MIDI note would normally trigger.
This kind of slicing and dicing is particularly effective with drum loops, because owing to the nature of REX files, each slice tends to be a single hit consisting of one or more drums. If you move these hits around, you can create a totally different drum pattern.