What structure generates Earth's magnetic field, and what is its primary defensive action?

Answer

Movement of molten iron in the core deflects the solar wind.

The magnetic field, or magnetosphere, is created by the motion of liquid, molten iron deep within the planet's core. This field acts as an invisible shield to deflect the charged particles constantly emitted by the Sun, known as the solar wind.

What structure generates Earth's magnetic field, and what is its primary defensive action?
supportsystemstarplanetlife