We develop a statistical mechanical theory for the mechanism of hydrogen exchange in globular proteins. Using the HP lattice model, we explore how the solvent accessibilities of chain monomers vary as proteins fluctuate from their stable native conformations. The model explains why hydrogen exchange appears to involve two mechanisms under different conditions of protein stability: (1) a ''global unfolding'' mechanism by which all protons exchange at a similar rate, approaching that of the denatured protein, and (2) a ''stable-state'' mechanism by which, protons exchange at rates that can differ by many orders of magnitude. There has been some controversy about the stable-state mechanism: does exchange take place inside the protein by solvent penetration, or outside the protein by the local unfolding of a subregion? The present model indicates that the stable-state mechanism of exchange occurs through an ensemble of conformations, some of which may bear very little resemblance to the native structure. Although most fluctuations are small-amplitude motions involving solvent penetration or local unfolding, other fluctuations (the conformational distant relatives) can involve much larger transient excursions to completely different chain folds.