What Is an X-Ray? How It Works and What to Expect

An X-ray is a type of high-energy light, invisible to the human eye, that can pass through soft tissue but gets absorbed by dense materials like bone. This property makes it one of the most widely used tools in medicine: a machine sends X-rays through your body, and a detector on the other side captures the pattern of what passed through and what didn’t, creating an image of your internal structures. A standard chest X-ray delivers about 0.02 millisieverts of radiation, roughly equivalent to 10 days of the natural background radiation you absorb just living on Earth.

How X-Rays Are Produced

Inside an X-ray machine, a tube heats a wire filament until it releases a stream of electrons. Those electrons accelerate at enormous speed toward a metal target, usually made of tungsten. When the electrons slam into the tungsten atoms, two things happen. Most commonly, an electron passes close to the nucleus of a tungsten atom, and the strong pull of the nucleus forces the electron to brake and change direction. That lost energy converts into an X-ray photon. This “braking radiation” accounts for the majority of X-rays the machine produces.

Less frequently, an incoming electron knocks out one of the tungsten atom’s own electrons. When another electron from a higher energy level drops down to fill the gap, it releases a photon with an energy unique to tungsten. These are called characteristic X-rays because their energy acts like a fingerprint of the target metal. Together, both processes generate a controlled beam of X-ray photons that can be aimed at a specific part of your body.

How X-Rays Create an Image

X-rays work as a diagnostic tool because different tissues absorb them at different rates. Dense materials like bone absorb most of the X-ray beam, so very few photons reach the detector behind your body. Those areas appear bright white on the final image. Soft tissues like muscle and organs absorb less, appearing in shades of gray. Air, which absorbs almost nothing, shows up black. This is why your lungs look dark on a chest X-ray while your ribs appear white.

For some exams, this natural contrast isn’t enough. If your doctor needs to see your digestive tract or blood vessels more clearly, you may be given a contrast medium, a liquid containing barium or iodine that temporarily coats or fills a structure so it stands out on the image. Depending on the exam, you might swallow it, receive it through an injection, or have it delivered as an enema.

Common Medical Uses

X-rays are typically the first imaging test ordered because they’re fast, widely available, and effective at spotting a range of problems. Bone fractures are the most familiar use: because bone absorbs X-rays so well, even hairline cracks show up clearly. Chest X-rays can reveal pneumonia, fluid around the lungs, an enlarged heart, or signs of lung cancer. Dental X-rays, which use an extremely low dose of about 0.004 millisieverts for a set of four bitewing images, help detect cavities, infections, and bone loss around the teeth.

Beyond these basics, X-rays help evaluate joint damage from arthritis, check for swallowed objects in children, monitor the healing of broken bones over time, and screen for conditions like scoliosis. Mammography is a specialized form of X-ray imaging designed to detect breast cancer. When more detail is needed than a standard X-ray can provide, a CT scan, which combines many X-ray images taken from different angles, creates cross-sectional “slices” of the body.

What Happens During the Exam

Most X-rays take only a few minutes. You’ll undress the body part being examined and may be given a gown. You’ll need to remove jewelry, eyeglasses, and any metal objects, since metal shows up brightly on the image and can obscure the area your doctor wants to see. A technologist will position you against a flat panel detector or over an imaging plate, then step behind a protective barrier to take the image.

You’ll be asked to hold very still, and sometimes to hold your breath for a moment, because even slight movement can blur the picture. The X-ray itself is completely painless. You won’t feel anything when the beam passes through you. If someone else needs to stay in the room with you (a parent holding a child still, for example), they’ll typically wear a lead apron to block stray radiation.

How X-Ray Technology Has Evolved

Traditional X-rays used photographic film, similar in concept to a camera. The film had to be chemically developed, and each exposure had a narrow margin for error. If the image was too dark or too light, it often needed to be retaken. Digital X-ray systems have largely replaced film in modern hospitals and clinics, and the improvements are significant.

Digital detectors respond two to four times faster than film, which means they need less radiation to produce a usable image. They also have a dramatically wider dynamic range. Where film could capture a contrast range of about 1:40, digital systems handle ranges of 1:1,000 or more, making it far easier to see both bone and soft tissue in a single image without retaking the shot. The images appear on screen within seconds, can be enhanced with software, and are stored electronically for easy sharing between doctors. Newer solid-state flat panel detectors push quality even higher while lowering the required dose further.

Radiation Exposure and Safety

X-rays are a form of ionizing radiation, meaning they carry enough energy to knock electrons out of atoms. When this happens inside living tissue, it can damage cells in two ways. Most of the harm is indirect: the X-ray photons split water molecules inside your cells into highly reactive fragments called free radicals, which then damage DNA and other cell components. Less commonly, an X-ray photon strikes DNA directly, potentially breaking one or both strands of the double helix.

Your cells have built-in repair systems for this kind of damage. When the damage is minor, cells fix the breaks and carry on. When it’s too severe to repair, the cell typically self-destructs through a controlled process rather than continuing to divide with errors. Problems arise mainly with large or repeated doses, where the sheer volume of damage can overwhelm these repair systems.

In practical terms, the doses from diagnostic X-rays are very small. A chest X-ray delivers about 0.02 mSv. A set of dental bitewings delivers 0.004 mSv. For comparison, you absorb about 3 mSv per year just from natural sources like radon gas, cosmic rays, and trace radioactive elements in food and soil. The guiding safety principle in radiology is ALARA, which stands for “as low as reasonably achievable.” This means every X-ray should have a clear medical purpose, and the equipment and technique should be calibrated to use the lowest dose that still produces a diagnostic image. The brief exposure from a medically necessary X-ray is considered very low risk compared to the benefit of catching a fracture, infection, or tumor early.