There are plenty of explanations on the internet, so unsure what you are seeking specifically
Essentially, it was a phenomenon discovered specifically with mass spectrometry, a method used to identify molecules by their overall mass and characteristic fragments. The molecules of interest are ionized and identified by the charge to mass ratios of their fragment products. Scientists determined that for some molecules, the fragments could only be present due to
internal molecular rearrangement which was named after the person who made the discovery - McLafferty rearrangement.
The rearrangement involves a
six-membered ring transition state in which the carbonyl group pulls off the gamma proton (H+), splitting the molecule into two pieces. These pieces consist of an enol radical cation and a neutral alkene fragment. The enol radical cation is observed in the mass spectrum (since it has a charge), while the neutral alkene fragment is not observed (since it doesn’t have a charge). Any carbonyl compound with hydrogen in the gamma position (not just esters) will likely have a peak in the mass spectrum corresponding to the enol radical cation formed by the McLafferty rearrangement.
McLafferty rearrangement enabled the production of the radical
cation, a fragment which has a
mass to charge ratio which can be detected and measured and understanding how molecular rearrangement was involved in the production of the fragments, enables the original molecule (ie. the exact ester in the third example) to be determined from the reaction product. In the linked website (and diagram screenshot of examples), the third example is of an ester (methyl hexanoate):
View attachment 43454