system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Can you explain how the Earth creates a magnetic field, and what are some of the natural occurrences it influences?
gpt
So: the core of the earth is made of hot, molten, flowing metal.

The hot, flowing metal makes electrical currents. Electricity and magnetism are different components of the same thing, so (for big-brained physics reasons) electrical currents generate a secondary magnetic field.

Probably the biggest natural occurrence it affects is protecting the earth from the solar wind, by deflecting charged particles from hitting the earth. A side effect of this is the aurora borealis.