The measurement in outline
The sample is ionised — for peptides, usually by electrospray ionisation, which transfers molecules from solution into the gas phase as charged species with minimal fragmentation. The analyser then separates ions by mass-to-charge ratio, and the detector records their abundance.
The result is a spectrum of intensity against mass-to-charge ratio. From it, the neutral molecular mass of the compound is reconstructed and compared with the mass calculated from the intended amino acid sequence.