Because of its mineral makeup. The iron and nickel of the core melt, but the silica-rich mantle contains a whole lot of other elements as well. The more elements you have in a mixture, the higher the melting temperature will be, and so the mantle is not molten. This concept is called the eutectic, and its similarly why a mixture of water and salt has a much lower freezing temperature than just water by itself.
So if the outer core is liquid, then why is the mantle thicker and more viscose?
Because of its mineral makeup. The iron and nickel of the core melt, but the silica-rich mantle contains a whole lot of other elements as well. The more elements you have in a mixture, the higher the melting temperature will be, and so the mantle is not molten. This concept is called the eutectic, and its similarly why a mixture of water and salt has a much lower freezing temperature than just water by itself.