It turns out that many materials can be a solid at a higher temperature if the pressure is also higher. So, even though it is hotter in the inner core, the pressure in the core is also higher, and you can have solid iron-nickel instead of liquid.
I hope this helps