The surface of the Sun is 10,000 degrees, and the Earth's core is 10,800-12,000 degrees Fahrenheit.
Here's why the core is so hot :
- Heat from when the planet formed which hasn't been lost yet.
- Frictional heating caused by denser core material sinking to the center of the planet, and
- Heat from the decay of radioactive elements.