Thermal history of the Earth