You’ve almost certainly seen the diagram—the layers of the Earth exposed like a slightly more complicated hard-boiled egg. The crust we live on is actually a thin shell, with the hot (but still solid) mantle forming a thick layer below that. At the center—contra Jules Verne—there are inner and outer core layers composed primarily of iron. The outer core is the only layer that’s liquid, as the inner core is actually solid.
Although you’ll never visit the core, it does affect your life quite profoundly. Earth’s magnetic field is produced by the convection of the liquid outer core, and that directs compasses and shields us from the effects of the solar wind. The history of Earth’s magnetic field is a big question—not least because we’re actually not sure when the inner core solidified.
Magnets… well, you know
There are actually geologic records of the magnetic field. Tiny crystals of magnetic minerals in cooling magma will align themselves with the magnetic field before being frozen in place. This can be useful because Earth’s magnetic field frequently flips poles (meaning compass needles would point to geographic south). The orientation of those mineral needles also indicates how close to the equator they were when they formed. The information trapped by these minerals was the last piece that cracked the case of plate tectonics, in fact, and it enables us to figure out where each continent was in the past.