Earth's magnetic field is generated by the churn of its liquid nickel-iron outer core, but it is not a constant feature.