When hemoglobin in blood carries oxygen
it is a slightly different shape than when not carrying oxygen.
Different shape causes different absorption of light at very specific wavelengths. Two wavelengths of light (visible red 660 nm and infrared 905 nm) are shone through your skin and absorbance is measured. Ratio between oxygenated and deoxygenated hemoglobin is calculated. Displayed as a %.