The domain theory of magnetism explains what happens inside materials when magnetized. All large magnets are made up of smaller magnetic regions, or domains. The magnetic character of domains comes from the presence of even smaller units, called dipoles.
Dipoles are called north and south by convention. They interact with their neighboring dipoles; if they align with all the poles in one direction, then a larger magnetic domain is produced.
Atoms are arranged in such a way in most materials that the magnetic orientation of one electron cancels out the orientation of another electron; however, other ferromagnetic substances such as iron are different. The atomic makeup of these substances is such that smaller groups of atoms band together into areas called domains; in these, all the electrons have the same magnetic orientation.