X-ray fluorescence is a fluorescence process that occurs when x-rays fall onto a material.

The energy of the radiation causes electrons in the material to excite: they jump to a higher energy level. Since the excited state is not a stable state, after a while the electrons will fall back to a lower level and emit radiation with a wavelength proportional to the difference in the energy between the higher and the lower energy level.
The electrons do not necessarily immediately fall back to their original level, it's also possible that this happens in several steps. Each step causes radiation of a different wavelength to occur.

Since the energy levels of electrons are different for different atoms, x-ray fluorescence can be used to determine the composition of a material. X-rays are made to fall on the material and the wavelengths of the radiation that come back are measured. Each kind of atom has its own spectrum, so the different atoms in the material can be recognized, and by comparing the intensities of the spectra the amount present of each component can also be determined.