How do mass spectrometers measure the mass of a compound?

A Level