CT scanners work by using a combination of X-rays and computer processing to generate detailed images. The patient lies on a table that slides into a large, doughnut-shaped machine. The scanner rotates around the patient, capturing multiple images from different angles. These images are then processed by a computer to create cross-sectional slices, which can be examined individually or combined to form a 3D image.