I understand that the outer core of the Earth is liquid (iron and other elements) because it is at the outer core’s pressure that the temperature can maintain the liquid phase of iron. The inner core is solid because at its pressure the temperature cannot melt iron.