XRM operates by directing a beam of X-rays at a sample and detecting the transmitted or scattered X-rays to form an image. The technique can be performed in various modes, including transmission, phase contrast, and fluorescence. The choice of mode depends on the specific information required about the sample.