Let G be a totally disconnected, locally compact group. A closed subgroup of G is locally normal if its normalizer is open in G. We begin an investigation of the structure of the family of closed locally normal subgroups of G. Modulo commensurability, this family forms a modular lattice LN(G), called the structure lattice of G. We show that admits a canonical maximal quotient H for which the quasicentre and the abelian locally normal subgroups are trivial. In this situation LN(H)has a canonical subset called the centralizer lattice, forming a Boolean algebra whose elements correspond to centralizers of locally normal subgroups. If H is second-countable and acts faithfully on its centralizer lattice, we show that the topology of is H determined by its algebraic structure (and thus invariant by every abstract group automorphism), and also that the action on the Stone space of the centralizer lattice is universal for a class of actions on profinite spaces. Most of the material is developed in the more general framework of Hecke pairs.