system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How did the center of the earth get so hot?

I can understand how it stays so hot now but do we know how it initially got so how?
gpt
This isn't how the center got so hot, rather its about the "cooling" of the outside.

When the planets of our solar system were formed, they were just balls of random gas and plasma and ... stuff. The masses of matter flying around the sun came together and formed the planets. So you have the Sun... and orbiting the sun you have these hot balls of gas.  Hot because as all this mass comes together (because matter attracts other matter = gravitational attraction), there's energy and stuff. Like rubbing the palms of your hands together. Friction.

Over time, the surface of the earth cools and life happens, atmosphere forms, dinosaurs, Benjamin Franklin, cable TV and Jennifer Lawrence. Given enough time the center of the earth will cool enough to solidify, and then compasses will stop working, but at the rate we're going, we'll all be dead or living on other planets by then.