Putting a spin on things
Magnetism comes from moving electrical charges. If electrical charges stay still, there is no magnetism.
An electron moving around the nucleus, or center, of its atom produces magnetism. In a similar way, a moving electrical current in a loop of wire produces magnetism.
There is another type of movement. Many charged particles such as electrons and protons spin like a top. The moving charge within those particles can produce magnetism.
In many materials, the charged particles in the atom are orbiting and spinning in different directions. Magnetic effects from the moving electrons cancel each other out. Those materials have little or no magnetism.
But other materials, such as iron, can be treated so most of the particles spin and orbit in the same direction. These materials are strongly magnetic.
A giant magnetic field called the magnetosphere surrounds the Earth. Constantly changing magnetic fields can affect satellites, so NASA and other agencies are trying to learn as much as possible about the magnetosphere.
The sun also has a magnetic field. It encloses the whole solar system. The sun’s magnetic field is called the heliosphere. Sunspots are connected to magnetic loops in the sun.
A moving force