X-ray flaw detection works by transmitting X-rays through the material being inspected and capturing the resulting image on a detector. Variations in the material's density and structure cause differences in the X-ray absorption, allowing internal defects such as cracks, voids, inclusions, and weld discontinuities to be identified.