The electrical basis for the magnetic properties of matter has been verified down to the atomic level. Because the electron has both an electric charge and a spin, it can be called a charge in motion. This charge in motion gives rise to a tiny magnetic field. In the case of many atoms, all the electrons are paired within energy levels, according to the exclusion principle, so that the electrons in each pair have opposite (antiparallel) spins and their magnetic fields cancel. In some atoms, however, there are more electrons with spins in one direction than in the other, resulting in a net magnetic field for the atom as a whole; this situation exists in a paramagnetic substance. If such a material is placed in an external field, e.g., the field created by an electromagnet, the individual atoms will tend to align their fields with the external one. The alignment will not be complete, due to the disruptive effect of thermal vibrations. Because of this, a paramagnetic substance is only weakly attracted by a magnet.
In a ferromagnetic substance, there are also more electrons with spins in one direction than in the other. The individual magnetic fields of the atoms in a given region tend to line up in the same direction, so that they reinforce one another. Such a region is called a domain. In an unmagnetized sample, the domains are of different sizes and have different orientations. When an external magnetic field is applied, domains whose orientations are in the same general direction as the external field will grow at the expense of domains with other orientations. When the domains in all other directions have vanished, the remaining domains are rotated so that their direction is exactly the same as that of the external field. After this rotation is complete, no further magnetization can take place, no matter how strong the external field; a saturation point is said to have been reached. If the external field is then reduced to zero, it is found that the sample still retains some of its magnetism; this is known as hysteresis.