i hope this helps you
from google:
"The Earth gets hotter as one travels towards the core, known as the geothermal gradient. Geothermal gradient is the amount the Earth's temperature increases with depth, indicating heat flowing from the Earth's warm interior to its surface. On average, the temperature increases by about 25°C for every kilometer of depth"
Answer:
It was discovered in the late 1900s. More specifically, 1964.
Add-on:
i hope this helped at all.