What is mass spectrometry and how does it work?

A Level