How is Earth a magnet?
The Earth is a magnet because it exhibits a magnetic field around it, like all magnets, be it natural or artificial. The movement of molted iron inside its core is assumed to be responsible for imparting it with magnetic properties.