1. A molten, electrically conductive core: This is usually made of iron and nickel, which are excellent conductors of electricity. The molten state allows the metals to flow freely.
2. Rapid rotation: The planet's rotation creates currents within the molten core, which in turn generate the magnetic field.
Think of it like a dynamo: the spinning molten core acts like a generator, creating a magnetic field.