More specifically, it's the outer core that is responsible. Here's why:
* The outer core is liquid: Made primarily of iron and nickel, it is constantly moving due to convection currents driven by heat from the Earth's interior.
* Convection and electric currents: This movement of liquid metal generates powerful electric currents.
* Earth's magnetic field: These electric currents create a magnetic field that extends far beyond Earth's surface, forming the magnetosphere.
Think of it like a giant dynamo! The Earth's rotation and the churning of the outer core act as a generator, producing the magnetic field that protects us from harmful solar radiation.