The specific X-Rays we use to identify elements are called "Characteristic X-Rays" Each electron in every individual element occupies a certain distinct energy level, unique to only that element and electron position.
By removing a particular electron from one an atom's electron shells, a gap is left, which must be filled. This gap is filled with a different electron, either free, or borrowed from another shell.
Upon this new electron being bound to the atom, an X-Ray photon of the exact binding energy is generated. It is this X-Ray which "fluoresces" from the atom that we harvest and measure.
XRF then is the mechanism and process by which we first excite by external application of energy an inner electron to an energy level in excess of it's native binding energy, causing it to be no longer compatible with the shell in which it exists, leaving a gap, which is filled by a different electron, which when once bound fluoresces? a characteristic X-Ray
Be it known, while X-Rays themselves are often the source of external energy applied to cause an X-Ray to fluoresce, many other types of energy are used. My personal initial experiments were done with Beta Particles (electrons) and eventually included not only X-Rays but Alpha Particles.
Sometimes when we speak of XRF by charged particle excitement we use the term PIXE instead of XRF (Particle Induced X-Ray Emission) just to make Dr. Gilmore happy.
George Dowell