Whether through alpha cleavage or loss of a water molecule, molecular fragmentation in a mass spectrometer tends to follow certain patterns. You can often predict what peaks will be observed in the mass spectrum simply by looking at a molecule's structure and seeing which pieces would be easy to break off to make stable cations.
The ionizer makes the molecules into radical cations (cations with an unpaired electron), which then generally break apart into a cationic piece (which is seen by the detector) plus a neutral radical piece (not seen by the detector).
Alkanes generally break apart to make the most highly substituted cation. Tertiary cations (cations substituted with three carbons) are more stable than secondary cations (cations substituted with two carbons), which in turn are more stable than primary cations (cations substituted with only one carbon). (The figure shows an example of tertiary and primary cations.) Therefore, breaks in a molecule that make tertiary cations are likely to give fragments that correspond to large peaks in the mass spectrum, because the most stable fragments produce the largest peaks.
Favored and unfavored bond cleavage
When a molecule contains heteroatoms (elements such as oxygen, sulfur, and nitrogen), breaking next to these atoms makes cations that are resonance stabilized. For example, breaking the C-C bond next to an alcohol group creates a resonance-stabilized carbocation. This type of break is called alpha cleavage and is commonly seen in alcohols (as shown here).
This same pattern of alpha cleavage is observed with amines, as shown in the next figure.
Alpha cleavage is also commonly seen in ethers, where the bond breaks adjacent to the oxygen (shown in the next figure).
Breaks are often seen next to carbonyl groups (C=O groups), because this creates the resonance-stabilized cation (shown in the next figure).
In addition to alpha cleavage, alcohols readily lose a water molecule to form an alkene (a carbon-carbon double bond), as shown in the next figure. This is why the mass spectrum of an alcohol often has a peak corresponding to the loss of 18 mass units (the weight of water).