An X-ray is a safe and painless procedure that's often used to produce images of the inside of the body.
It's a very effective way of looking at fractured bones, such as a broken arm or wrist.
X-rays can also be used to examine organs and identify problems. For example, an X-ray can highlight a lung infection, such as pneumonia.
They are also often used by surgeons during therapeutic procedures, such as a coronary angioplasty, to help guide equipment to the area being treated.
How X-rays work
X-rays are a type of radiation. They're similar sources of energy to light. However, light has a much lower frequency than X-rays and is absorbed by your skin. X-rays have a higher frequency and pass through the human body.
As X-rays pass through the body, energy particles called photons are absorbed at different rates. This pattern shows up on the X-ray images.
The parts of your body made up of dense material, such as bone, show up as clear white areas on an X-ray image. The softer parts, such as your heart and lungs, show up as darker areas.
Having an X-ray
X-rays are carried out by radiographers, who are healthcare professionals trained to use imaging technology, including X-ray machines, computerised tomography (CT) scanners and ultrasound scanners.
During an X-ray, you'll be asked to lie on a table or stand against a flat surface so that the part of your body being examined is positioned between the X-ray machine and a photographic plate.
The X-ray will last for a fraction of a second. As the X-rays hit the photographic plate, the plate will capture a snapshot of the image.
The image will then be transferred to a computer so that it can be studied on a screen and, if necessary, printed out.
Exposure to high levels of radiation can be very harmful. However, the X-rays used for medical purposes are safe because the dose of radiation is very small.
The strength of radiation in relation to long-term risk is measured using units called millisieverts (mSv). Some examples of typical exposures are:

chest X-ray – 0.02 mSv

a year's worth of medical tests – 0.4 mSv

average annual exposure to natural radiation – 2.2 mSv

In the UK, 20 mSv is the maximum that someone who works with radiation is allowed to be exposed to in any given year. Most workers receive considerably less than this.

X-rays are a safe and effective method of capturing images of the body's organs and bones 

What are X-rays?
X-rays are a form of radiation that can pass through solid and semi-solid substances.
When used in carefully controlled doses, X-rays can be used to capture images of the body's internal structures.

Broken arm or wrist
A broken arm or wrist is usually caused by a fall or by force from a collision. It typically takes about 6-8 weeks to heal in adults, and less time in children

Broken ankle
A broken ankle is a relatively common injury. Find out how to tell if you've broken your ankle, and what you should do
When X-ray is used 
Bone is a very hard and dense tissue that shows up clearly on X-rays. X-rays are therefore very useful for diagnosing bone-related problems.
For example, X-rays can be used to help identify:

fractures and breaks

problems with teeth, such as loosening of the teeth, root erosion and dental abscess, which can all be indirect signs of tooth decay

thinning and weakening of the bones (osteoporosis) 

bone infection (osteomyelitis)

an abnormal curvature of the spine (scoliosis)

bone tumours, which can either be benign (non-cancerous) or malignant (cancerous) 

X-rays are also sometimes used during investigative or therapeutic procedures to help the surgeon guide equipment to the area being examined or treated.
For example, X-rays are often used during a coronary angioplasty, where a catheter (a long, thin, flexible tube) is inserted into a blood vessel either in your groin or arm.
X-rays are used to guide the tip of the catheter to your heart or the arteries that supply your heart. A special fluid called contrast medium, which shows up clearly on X-rays, is injected through the catheter. The images produced, known as angiograms, are able to highlight whether a blood vessel is blocked.
Chest examination
Major organs and blood vessels don't show up as clearly on X-rays as bones, but they are visible. A chest X-ray is therefore a good way of identifying changes or abnormalities in your heart, lungs and major arteries.
In particular, chest X-rays can help diagnose:

heart conditions – such as heart failure, congenital heart disease and pericarditis (inflammation of the heart lining)

lung conditions – such as pneumonia, lung cancer and chronic obstructive pulmonary disease (COPD)

Contrast medium
Contrast medium is liquid that contains dye. It's sometimes swallowed or injected before an X-ray is taken and shows up clearly in white, helping to distinguish between different structures in the body.
Contrast medium is usually harmless and passes out of the body in your urine or faeces. However, in rare cases it can cause an allergic reaction. Make sure you tell the radiologist if you've had an allergic reaction to iodine or contrast medium in the past, or if you have any other allergies.
Types of X-ray
There are various ways that X-rays can be used to investigate different parts of the body. These are described below.
Barium swallow
Barium is a type of contrast medium that you may be given in a solution to drink. After the barium has passed into your upper digestive system, a series of X-rays will be taken.
A barium swallow can be used to diagnose problems with the upper digestive system, such as swallowing problems (dysphagia) and persistent symptoms of abdominal pain.
Barium enema
A barium enema involves barium solution being pumped through your anus (back passage) and into your bowel.
Barium enemas can be used to diagnose bowel problems, such as persistent constipation and blood in your faeces (stools).
Angiography is a type of X-ray used to examine blood vessels. The images created during angiography are called angiograms.
As blood vessels don't show up clearly on ordinary X-rays, contrast medium is injected into the area being examined. The dye highlights the blood vessels as it moves through them, showing up in white on the angiogram.
Studying the movement of the dye through a blood vessel can often highlight problems, such as blockages.
Less commonly, angiographies are also carried out using magnetic resonance imaging (MRI) and computerised tomography (CT) techniques.
Intravenous urogram (IVU)
During an intravenous urogram (IVU), contrast medium is injected into your veins.
Iodine solution is usually used, which moves into your kidneys and bladder. X-rays of your kidneys and bladder will then be taken.
IVU is often used to diagnose problems with the urinary system.
How an X-ray is carried out 
During an X-ray, you'll be asked to lie on a table or stand against a flat surface.
This is so the part of your body being examined can be positioned between the X-ray machine and photographic plate.
X-rays are usually carried out by radiographers, who are healthcare professionals trained in using imaging technology such as X-ray machines, computerised tomography (CT) scanners and ultrasound scanners.
The X-ray machine
An X-ray machine is made up of several parts, including an X-ray tube, a photographic plate and lead shielding. 
The X-ray tube is like a giant light bulb that uses high-voltage electricity to generate X-rays. The lead shielding directs the X-rays towards the part of your body being examined and prevents them escaping in all directions. The photographic plate captures the image produced by the X-rays as they pass through your body.
In the past, the photographic plate used the same type of film as a traditional camera. However, nowadays the plate in most X-ray machines is connected to a computer so that a digital image can be taken.
The X-ray procedure
When you have an X-ray, the part of your body being examined will be exposed to X-rays for a fraction of a second. It's a safe and painless procedure.
As the X-rays hit the photographic plate, the plate will capture a snapshot of the image. The image will be transferred directly from the photographic plate to a computer so that it can be studied on a screen. If necessary, the image can be also be printed out.
While the X-ray is being taken, you'll need to keep still so that the image produced isn't blurred. More than one X-ray may be taken from different angles to provide as much information as possible. For example, if your lungs are being examined, X-rays of both the front and side of your body will be taken.
A radiologist will study your X-ray images. Radiologists are doctors who are specially trained to carry out examinations and interpret medical images, such as X-rays and CT scans.
The radiologist may discuss their findings with you on the day of your X-ray, or they may send a report to your GP.
Risks of an X-ray 
People are often concerned about being exposed to radiation during an X-ray. However, everyone is exposed to sources of natural radiation throughout their life.
Natural radiation is sometimes known as background radiation. Sources of background radiation include:

radon – a naturally occurring radioactive gas found in low levels in the atmosphere 

cosmic rays – a type of radiation that originates from space (from the sun and stars)

the earth – soil and rocks contain various radioactive materials that have been present since the earth was formed; these contribute to our exposure, as do building materials made from soil, rocks and stones

food and water – for example, nuts, bananas, red meat and potatoes all contain tiny traces of radiation

Cancer risk
Being exposed to X-rays carries a theoretical risk of triggering cancer at a later date, as does exposure to background radiation.
However, this risk is very low. For example, the Health Protection Agency (HPA) has calculated that:

an X-ray of your chest, teeth, arms or feet is the equivalent of a few days' worth of background radiation, and has a less than 1 in 1,000,000 chance of causing cancer

an X-ray of your skull or neck is the equivalent of a few weeks' worth of background radiation, and has a 1 in 100,000-1,000,000 chance of causing cancer

an X-ray of your breasts (mammogram), hip, spine, abdomen or pelvis is the equivalent of a few months' to a year's worth of background radiation, and has a 1 in 10,000-100,000 chance of causing cancer

an X-ray that uses a contrast fluid, such as a barium meal, is the equivalent of a few years' worth of background radiation, and has a 1 in 1,000-10,000 chance of causing cancer

It's important to put the risk of developing cancer from X-rays into perspective. More than one in three people in the UK will develop some form of cancer during their lifetime.
Your risk of developing cancer depends on many factors, including your age, lifestyle and genetic make-up.
X-rays and pregnancy
The doses of radiation used during an X-ray aren't thought to pose a risk to an unborn baby. However, as a precaution, X-rays that directly target the womb (abdominal X-rays) aren't usually recommended unless there's a clear clinical need.
In some cases, an alternative method that doesn't involve radiation, such as an ultrasound scan, may be recommended.
Before having an X-ray, you may be asked about the date of your last period. This is to check whether there's a chance that you could be pregnant.
Don't panic if you have an X-ray and later discover that you're pregnant. Even the most powerful types of X-rays, such as a barium enema, aren't thought to have any adverse effects on the outcome of a pregnancy.