Earth's internal heat comes from three main sources:
1) The accretion of dust and gas particles during the Earth's formation released gravitational potential energy and caused internal heating.
2) Radioactive decay of elements in the Earth's core and mantle, such as uranium and potassium, continues to generate heat.
3) Frictional heating from convection currents in the mantle also contributes to the Earth's internal heat. Seismic waves have allowed scientists to indirectly learn about the Earth's layered structure despite only drilling about 7 miles deep.