XPS comes from X-ray Photoelectrons Spectroscopy and, as the name suggests, it is a spectroscopic technique that measures photoelectrons emitted when a sample is excited with X-rays.
Basically, a sample is irradiated with X-rays and the emitted photoelectrons are counted and their energy measured. This allows the identification of the nature of atoms in the sample as well as their chemical state. It can be used for all atoms except H and He.
Previously known as ESCA (Electron Spectroscopy for Chemical Analysis), this invaluable technique has been developed in the ’60s and it is attributed mainly to K. Siegbahn who received the Nobel prize in 1981 for its discovery.

Typically a Mg or Al K-alpha radiation is used (about 1 keV) and for this relatively low energy only the surface of the sample (few nanometers) can be analyzed. However, 1 keV is sufficient to cause electron ejection from core levels of atoms.

A sample is bombarded with X-ray photons of a given energy Ex and the kinetic energy of the photoelectrons emitted, Ek, is measured.
Since Ex=Ek+Eb, where Eb is a bonding energy, knowing Ek allows to detect the bonding energy otherwise the nature of the atoms because the bonding energy in atoms is known. This is a characteristic spectrum of photoelectrons emitted. Together with these electrons emitted by the photoelectric effect, other electrons named Auger are also measured.
Ex is typically about 1keV and at this energy (see NIST database for absorption coefficients) the X-rays are “soft”, easily absorbed by air. Also, the electrons kinetic energy is much smaller so this instrument requires a very good vacuum (better than 10-8 mbar).