Magnetism is a phenomenon by which materials assert an attractive or repulsive force on other materials. Some well known materials that exhibit magnetic properties are iron, some steels, and the naturally occurring mineral lodestone. In reality all materials are influenced to one degree or another by the presence of a magnetic field, although in some cases the influence is too small to detect without special equipment.
For the case of electric current moving through a wire, the resulting force is directed acording to the "right hand rule". If the thumb of the right hand points along the wire from positive towards the negative side, the magnetic forces will wrap around the wire in the direction indicated by the fingers of the right hand. If a loop is formed, such that the charged particles are traveling in a circle then all of the forces in the center of the loop are directed in the same direction. The result is called a magenetic dipole. When placed in a magnetic field, a magnetic dipole will tend to align itself with that field. For the case of a loop, if the fingers of the right hand are directed in the direction of current flow, the thumb will point in the direction corresponding to the North pole of the dipole. In the earth's magnetic field the North pole of the dipole will tend to point north.
Magnetic dipoles or magnetic moments can often result on the atomic scale due to the movements of electrons. Each electron has magnetic moments that originate from two sources. The first is the orbital motion of the electron around the nucleus. In a sense this motion can be considered as a current loop, resulting in a magnetic moment along its axis of rotation. The second source of electronic magnetic moment is due to a Quantum Mechanical property called "spin", this property is in some ways analogous to the picture of an electron spinning about an axis and is related to the electron's angular momentum. However, it should be remembered that the Quantum Mechanical "spin" is actually a unique phenomenon from spinning in a macroscopic sense, so the analogy doesn't always hold. The spin magnetic moments may be in one of two directions, either the "up" direction or the "down" direction.
In an atom the orbital magnetic moments of some electron pairs cancel each other. The same is true for the spin magnetic moments. The overall magnetic moment of the atom is thus the sum of all of the magnetic moments of the individual electrons, accounting for moment cancellation between properly paired electrons. For the case of a completely filled electron shell or subshell, the magnetic moments completely cancel each other out. Thus only atoms with partially filled electron shells have a magnetic moment. The magnetic properties of materials are in large part determined by the nature and magnitude of the atomic magnetic moments.
Several forms of magnetic behavior have been observed including: