X-ray machines work by emitting a controlled beam of X-rays through the body. The X-rays are absorbed at different rates by different tissues. Bones, for example, absorb more X-rays and appear white on the resulting images, while softer tissues absorb less and appear in shades of gray. A detector captures the X-rays that pass through the body to create an image.