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.
It is always more convenient to model the force between two magnets as being due to forces between magnetic poles having magnetic charges 'smeared' over them. Such a model fails to account for many important properties of magnetism such as the relationship between angular momentum and magnetic dipoles. Further, magnetic charge does not exist. This model works quite well, though, in predicting the forces between simple magnets where good models of how the 'magnetic charge' is distributed are available.
Two models are used to calculate the magnetic fields of and the forces between magnets. The physically correct method is called the Ampère model while the easier model to use is often the Gilbert model.
Ampère model: In the Ampère model, all magnetization is due to the effect of microscopic, or atomic, circular bound currents, also called Ampèrian currents throughout the material. The net effect of these microscopic bound currents is to make the magnet behave as if there is a macroscopic electric current flowing in loops in the magnet with the magnetic field normal to the loops. The Ampère model gives the exact magnetic field both inside and outside the magnet. It is usually difficult to calculate the Ampèrian currents on the surface of a magnet, though it is often easier to find the effective poles for the same magnet.
Gilbert model: In the Gilbert model, the pole surfaces of a permanent magnet are imagined to be covered with so-called magnetic charge, north pole particles on the north pole and south pole particles' on the south pole, that are the source of the magnetic field lines. If the magnetic pole distribution is known, then outside the magnet the pole model gives the magnetic field exactly. In the interior of the magnet this model gives the H-field. This pole model is also called the Gilbert model of a magnetic dipole. Griffiths suggests (p. 258): "My advice is to use the Gilbert model, if you like, to get an intuitive 'feel' for a problem, but never rely on it for quantitative results."