The Earth is a wobbly rock, that does not spin on its axis or orbit around the Sun in perfect precision. Thus, about every 120,000 years, we have glacial ice ages, followed by warm periods.