X-ray tests are commonly done to show up bones and certain other tissues.
X-rays are a type of high-energy radiation. An X-ray machine can produce short bursts of X-rays. The rays pass easily through fluids and soft tissues of the body. However, dense tissue such as bone will block some of the X-rays. Density means how much of something there is in a certain amount of space. The more dense the tissue, the less X-rays pass through. Air and water are less dense because the particles which make them are not held closely together.
A film, similar to a photographic film, is placed behind the part of the body being X-rayed. The X-ray machine fires a short burst of X-rays through part of your body. The X-rays hit the film, which is then developed. The more X-rays that hit the film, the blacker it develops. So, dense parts of the body that block many of the X-rays show up as white (such as bones). Hollow or air-filled parts of the body show up as black (such as parts of the lung). Soft tissues (such as muscle and body organs) show up as various shades of grey, depending on how dense they are.
The developed film is studied by an X-ray doctor (radiologist) who sends a report to the doctor who requested the test.
An ordinary X-ray test is painless. You cannot see or feel X-rays. You should stay still when the X-ray beam is 'fired', as otherwise the picture may be blurred.
An ordinary X-ray is a quick, easy and a relatively cheap test. It may be all that is needed to diagnose or assess various problems. However, an ordinary X-ray has limited use. More sophisticated 'contrast' X-rays, CT scans, or other imaging techniques may be needed for accurate or further assessment of certain body parts, particularly of soft tissues and organs such as the brain or liver.
There is very little risk with having one X-ray test. However, with repeated tests there is a risk that the X-rays may damage some cells in the body, possibly leading to cancer in the future. The dose of X-ray radiation is always kept to the minimum needed to get a good picture of the particular body part being checked. (Also, radiographers who take the X-ray pictures always wear lead aprons or go behind a protective screen when the X-rays are fired, to avoid repeated exposure to X-rays.)
Pregnant women, if possible, should not have an X-ray test, as there is a small risk that X-rays may cause an abnormality to the unborn child. This is why women are asked before having an X-ray if they are, or might be, pregnant.