In ferromagnetic materials, like iron and nickel, groups of atoms band together in areas called domains. The magnetic strength and orientation, also called the magnetic moments, of the individual atoms in such a domain are aligned with one another and all point in the same direction. It’s those special domains that can turn the material into a magnet.
Every electron is a teeny tiny magnet. They have a north and a south pole and spin around an axis. This spinning results in a very small but extremely significant magnetic field.
In most materials, the magnetic orientation of one electron cancels out the orientation of another. When a material is ferromagnetic, though, those electrons and their magnetic fields join together and their axes align. This makes those little magnetic fields add up, instead of cancelling out.
The tutorial below shows you how these domains respond to an outside magnetic field.