The study of mean motion resonance dynamics was motivated by the search for an explanation for the puzzling problem of the Kirkwood gaps. The most important contributions in this field within the last 32 years are reviewed here. At the beginning of that period, which coi'ncides with the first long-term numerical investigations of resonant motion, different hypotheses (collisional, gravitational, statistical and cosmological) to explain the origin of the gaps were still competing with each other. At present, a general theory, based on gravitational mechanisms only, is capable of explaining in a uniform way all the Kirkwood gaps except the 2/1 one. Indeed, in the 4/1, 3/1, 5/2 and 7/3 mean motion commensurabilities, the overlap of secular resonances leads to almost overall chaos where asteroids undergo large and wild variations in their orbital elements. Such asteroids, if not thrown directly into the Sun, are sooner or later subject to strong close encounters with the largest inner planets, the typical time scale of the whole process being of the order of a few million years. Unfortunately, this mechanism is not capable of explaining the 2/1 gap where the strong chaos produced by the overlapping secular resonances does not attain orbits with moderate eccentricity, of low inclination and with low to moderate amplitude of libration. In the light of the most recent studies, it appears that the 2/1 gap is the global consequence of slow diffusive processes. At present, the origin of these processes remains under study.