Why Earth Behaves Like a Giant Magnet