An x-ray image is produced when a small amount of radiation passes through the body. The ability of x-rays to penetrate tissues and bones varies according to its composition and mass, which allows doctors to obtain images from inside the body.