How does an x-ray actually work?

How does an x-ray actually work?

Today's x-ray machines produce a stream of electromagnetic radiation that interacts with an anode in an x-ray tube. ... When x-rays come into contact with our body tissues, they produce an image on a metal film. Soft tissue, such as skin and organs, cannot absorb the high-energy rays, and the beam passes through them.