The dynamo. For terrestrial planets, the dynamo is a molten core of nickel-iron. Mercury and Earth have fairly strong dynamos and therefore fairly strong magnetic fields. Venus and Mars do not, and...
If you wrap a coil of wire around a bar of iron and pass a current, an electromagnet will result. This principle is used in generators where the casing is magnetised and the rotor rotates in the...