A bit more detail
When high-energy X-rays hit an atom, they can eject an inner electron, causing outer electrons to drop down and release energy. Because each element emits a unique set of energy levels, scientists use this process to identify chemical compositions without touching the sample.