Sensor Technology – Handheld XRF: How it works
XRF is an acronym for x-ray fluorescence, a process whereby electrons are displaced from their atomic orbital positions, releasing a burst of energy that is characteristic of a specific element. This release of energy is then registered by the detector in then XRF instrument, which in turn categorizes the energies by element.
https://www.bruker.com/products/x-ray-diffraction-and-elemental-analysis/handheld-xrf/how-xrf-works.html