An MRI scanner utilizes magnetic fields and radiofrequency pulses to align the protons in the body's water molecules. When these pulses are turned off, the protons emit signals that are converted into images by a computer. In contrast, a CT scanner rotates around the patient, sending X-rays through the body to produce multiple cross-sectional images. These images are then compiled to create a comprehensive view of the internal structures.