Magnetism
Magnetism is a class of physical phenomena that are mediated by magnetic fields. Electric currents and the magnetic moments of elementary particles give rise to a magnetic field, which acts on other currents and magnetic moments. The most familiar effects occur in ferromagnetic materials, which are strongly attracted by magnetic fields and can be magnetized to become permanent magnets, producing magnetic fields themselves. Only a few substances are ferromagnetic; the most common ones are iron, nickel and cobalt and their alloys. The prefix "" refers to iron, because permanent magnetism was first observed in lodestone, a form of natural iron ore called magnetite, FeO.
Force between magnets
Magnets exert forces and torques on each other due to the rules of electromagnetism. The forces of attraction field of magnets are due to microscopic currents of electrically charged electrons orbiting nuclei and the intrinsic magnetism of fundamental particles (such as electrons) that make up the material. Both of these are modeled quite well as tiny loops of current called magnetic dipoles that produce their own magnetic field and are affected by external magnetic fields. The most elementary force between magnets, therefore, is the magnetic dipole–dipole interaction. If all of the magnetic dipoles that make up two magnets are known then the net force on both magnets can be determined by summing up all these interactions between the dipoles of the first magnet and that of the second.