I don’t think anyone really knows, the last one was about 11,500 years ago and they seem to come about due to changes in atmosphere, the position of our planet with respect to the sun and changes in ocean currents.
Geology is also likely to play a role. There is some speculation that the formation of the Himalayas had an effect on the general cooling of the planet that started about 40mya.
Why might be this be the case? The formation of the Himalayas was associated with a lot more new rock being exposed to the effects of ‘weathering’. These processes include the reaction of CO2 dissolved in rainwater with the new rock to form new carbonate minerals – essentially this lowers the concentration of atmospheric CO2.
A similar process (of two land masses colliding) also radically changed ocean currents when North and South America joined about 3mya. The most important change (from a European point of view) was the formation of the ‘gulf stream’, which brings warmer and wetter than expected weather to Western Europe (curiously, the increased rainfall associated with this new current of warm water from the Caribbean, may have increased snowfall over Europe and resulted in a general cooling).
Comments