How does the mass spectrometer work?
simply told we your sample is inserted into the mass spectrometer where it the sample gets ionized which could be done with different types of ionisation methods (EI, ESI, maldi ...).
This ionisation causes fragmentation of the molecule, splitting it up into fragments.
Than the fragments gets detected by a detector forming a m/z spectra of the different fragments from the sample.
You can read more about it here: