Planet Earth is a magnet
Planet Earth also acts as a large magnet.
The electric currents in the planet's core maintain the planet's magnetic field or magnetosphere. It is similar to that of a regular bar magnet.
The planet's magnetosphere protects us from harmful solar winds. Near the planet's two poles, some solar winds can penetrate the magnetosphere, creating the northern lights.
Solar wind also modifies the planet's magnetic field.
The Earth's magnetosphere protects us from solar wind.