Here's why:
* Pressure: The immense pressure from the weight of all the layers above crushes the inner core into a solid state despite the extreme heat.
* Radioactive decay: The inner core contains radioactive elements that decay and release heat.
While the outer core is also very hot (around 4,500°C or 8,132°F) it's a liquid layer due to the lower pressure compared to the inner core.