An X-ray machine works by firing a beam of high-energy light through your body. Dense structures like bones absorb most of that energy, while softer tissues let more of it pass through. A detector on the other side captures what comes through, creating an image where bone appears white, air appears black, and everything else falls somewhere in between. The entire process takes a fraction of a second.
How the Machine Produces X-Rays
Inside the X-ray tube, a small wire filament (the cathode) is heated until it glows white-hot. That intense heat causes electrons to break free from the metal surface, forming a cloud of negatively charged particles. A high-voltage electrical field then slams those electrons across the tube toward a positively charged metal target, usually made of tungsten.
When these fast-moving electrons hit the tungsten target, two things happen. Most of them pass close to the nuclei of tungsten atoms and get sharply deflected, converting their motion energy into electromagnetic radiation. This “braking radiation” accounts for the bulk of the X-ray beam. A smaller fraction of electrons strike tungsten atoms hard enough to knock out one of the atom’s own inner electrons. When a neighboring electron drops in to fill that vacancy, it releases a burst of energy at a wavelength unique to tungsten. These characteristic X-rays add to the beam, and together the two processes produce a focused stream of radiation that can penetrate the human body.
Why Bones Show Up and Soft Tissue Doesn’t
The key to any X-ray image is differential absorption. Different tissues absorb different amounts of the beam depending on their density and the types of atoms they contain. Bone is packed with calcium and phosphorus, both relatively heavy elements that are very good at stopping X-ray photons. Muscle, fat, and organs are made mostly of carbon, hydrogen, and oxygen, which are lighter and let more of the beam pass through. Air, like the air in your lungs, barely absorbs anything at all.
The result is a shadow map. Wherever the beam is blocked, the detector receives less energy and that area appears bright white on the image. Wherever the beam passes through easily, the detector gets a stronger signal and that area appears dark. This is why a chest X-ray clearly outlines your ribs and spine but shows your lungs as dark fields, with the heart visible as a lighter silhouette between them. Soft tissues do show up, but as faint shadows rather than sharp outlines, because the density differences between one soft tissue and another are small.
How the Detector Captures the Image
Older X-ray systems used photographic film in a light-tight cassette. The X-rays that passed through your body would expose the film directly, much like visible light exposes camera film. Modern systems have replaced film with flat digital panels that are faster, more sensitive, and produce images a doctor can view on screen within seconds.
These digital detectors come in two main designs. Indirect-conversion detectors use a layer of fluorescent material that converts incoming X-ray photons into visible light. That light then hits a grid of tiny photodiodes, each one generating a small electrical charge proportional to the light it receives. A computer reads those charges pixel by pixel and assembles them into a grayscale image. Direct-conversion detectors skip the light step entirely. They use a layer of a material called amorphous selenium that turns X-ray photons straight into electrical signals. Both approaches produce high-resolution digital images that can be enhanced, stored, and shared electronically.
Contrast Agents: Making Soft Tissue Visible
Because standard X-rays struggle to distinguish one soft tissue from another, doctors sometimes use contrast agents to make specific structures stand out. These are substances that absorb X-rays much more effectively than the surrounding tissue, creating a stark difference on the image.
For imaging the digestive tract, you might swallow a thick barium sulfate drink or receive it as an enema. The barium coats the lining of your esophagus, stomach, or intestines, making their shape and contours clearly visible. For blood vessels, the bladder, or certain organs, an iodine-based contrast agent is injected into a vein. Both barium and iodine are heavy elements that block X-rays efficiently, so any structure they fill lights up bright white against the darker background of normal tissue.
Still Images vs. Real-Time Video
A standard X-ray captures a single frozen moment, like a photograph. Fluoroscopy uses the same basic technology but runs it continuously, producing a live video feed. This lets a physician watch a contrast agent flow through your intestines, guide a catheter through a blood vessel, or observe a joint as it moves. The tradeoff is that fluoroscopy delivers more radiation than a single snapshot because the beam stays on for seconds or minutes rather than a fraction of a second.
What X-Rays Do to Your Body
X-rays are a form of ionizing radiation, meaning they carry enough energy to knock electrons off atoms and break chemical bonds. When X-ray photons pass through your tissue, they can damage DNA in two ways. Some photons strike DNA molecules directly, snapping the sugar-phosphate backbone and causing breaks in the double strand. Others hit water molecules in and around your cells, splitting them into highly reactive fragments called free radicals. These free radicals then go on to attack nearby DNA, proteins, and cell membranes.
Your cells have built-in repair systems that fix most of this damage within hours. Single-strand DNA breaks are repaired routinely and almost always correctly. Double-strand breaks are harder to fix and carry a small risk of errors during repair, which is why minimizing unnecessary exposure matters. That said, the dose from a single diagnostic X-ray is extremely small. A chest X-ray delivers roughly 0.02 mSv of radiation. For comparison, the average American absorbs about 3 mSv per year just from natural background sources like radon gas, cosmic rays, and trace radioactive elements in soil and food.
How Radiation Exposure Is Minimized
Medical imaging follows a principle called ALARA: As Low As Reasonably Achievable. It rests on three practical strategies. First, time: the X-ray beam is on for the shortest duration that still produces a usable image. Second, distance: the technologist steps behind a barrier or into another room during the exposure, because radiation intensity drops rapidly with distance. Third, shielding: lead aprons or other protective barriers are placed over parts of your body that don’t need to be imaged, particularly reproductive organs and the thyroid.
These three factors explain the routine you experience during an X-ray visit. The technologist positions you carefully, asks you to hold still, then retreats behind a wall or leaded partition before triggering the exposure. They do this not because a single X-ray is dangerous to them, but because they perform dozens of exposures every day and the cumulative dose would add up without protection. For you as a patient receiving an occasional scan, the radiation dose is a tiny fraction of what you absorb from natural sources over the course of a year.

