Here's why:
* Composition: The inner core is primarily made of iron (Fe) with a small percentage of nickel (Ni).
* Pressure: The immense pressure at the Earth's center, created by the weight of all the layers above, forces the iron and nickel into a solid state, despite the extremely high temperature.
* Density: The combination of heavy elements and immense pressure results in a density of around 13 g/cm3, making it the densest layer of the Earth.
For comparison, the density of water is 1 g/cm3.