A pulse oximeter is used to measure the oxygen level in your blood using a non-invasive way. Haemoglobin are cells in the blood that carry oxygen. Hence they can occur in 2 states, either they are oxygenated or deoxygenated.
The pulse oximeter basically passes red light and infrared light through the finger and measures it on the other side. Based on the ratio of the sensor readings from the red light and the infrared light the amount of oxygenated and deoxygenated haemoglobin can be calculated. Some limitations of this approach are, that the sensor has to be callibrated and light from ambient sources needs to be accounted for as well.