Unprocessed film sits rolled up inside the film canister, safely shielded from most outside light until you expose it with your camera.
X-rays, which are a form of electromagnetic radiation, are able to penetrate the metal film canister and activate the silver crystals in film emulsion, even though they fall outside the spectrum of human vision. Faster films are more affected by X-rays.
When film is processed in a darkroom at a photo lab, the images are developed and "fixed" permanently onto the emulsion, which is turned into a negative.
Processed film no longer has an active emulsion, and the images contained on your negatives are not affected by X-rays.
If you expose negatives to constant or extremely bright light over many years, they can experience some fading. However, even multiple passes through the X-ray machine will not generate enough light to harm your processed photographic negatives.