How does a pulse oximeter measure oxygen levels in the blood?

How does a pulse oximeter measure oxygen levels in the blood?