X-rays are a form of electromagnetic radiation that can penetrate the body and create images of internal structures. When X-rays pass through the body, different tissues absorb varying amounts of radiation. This differential absorption is captured on a detector, producing an image that can be analyzed by healthcare professionals.