The Earth has four layers: crust, mantle, outer core, and inner core. The crust is the thinnest and solid outer layer, while the mantle is the thickest, consisting of molten rock that flows. The outer core is a liquid layer of iron and nickel, and the inner core is a solid sphere of nickel and iron, the hottest layer, responsible for Earth's magnetic field.