The information presented below is drawn from “Electricity and Magnetism: Berkeley Physics Course,” Vol. 2, 2nd ed., by Edward M. Purcell.
We now understand the magnetism of materials to be derived from the motion of the electrons within atoms. Electrons spin, effectively becoming revolving spheres of charge. This means that they have a magnetic moment. In the diagrams above, the arrows indicate the direction of the angular momentum. The magnetic moments point in the opposite direction. The intrinsic magnetic moment of an electron is 9284.764e-27 J. In most atoms the electrons pair up and spin in opposite directions, and their magnetic moments then cancel. Some atoms have an odd number of electrons, which means that one will be unpaired, and its magnetic moment will not be canceled. This type of atom is termed “paramagnetic.” The magnetic moments within paramagnetic substances align within an external field. However, thermal agitation tends to disrupt the orderly lining up of these freely swiveling magnetic moments; therefore paramagnetism increases as the temperature drops.
In ferromagnetic materials, or the materials that are commonly known as magnetic, it is energetically favorable for the spins of adjacent atoms to be parallel. This is due to the quantum mechanics of ferromagnetic atoms, and as a result, areas where magnetic moments line up in the same direction form, called domains. In an unmagnetized piece of iron, these magnetic domains point in random directions and cancel, and no significant magnetic field is present. Magnetization causes magnetic domains in favorable directions to spread and grow larger, therefore creating a magnetic field. For example, if an external magnetic field is applied, the moments that are parallel to the field are at lower energy than those that are not, making them energetically favorable. This causes favorable domains to grow, as atoms at the boundaries adopt the favored direction. The shifting in domain structure causes the ferromagnetic material to develop a magnetic field.
The iron crystal structure is cubic, as shown to the left. These cubic axes are the easiest axes of magnetization, which means atoms will prefer to align themselves in this direction. This is an important property of ferromagnetic materials, for it prevents atoms from swiveling freely. In order to align themselves in another of the favored axes, the atoms would have to go through less favorable positions. This is why permanent magnets largely retain the magnetization that they are given.
Ampere’s model is startlingly close to the truth. There are no circular molecular currents after all, but the spinning electrons act just like loops of current. These “currents” do indeed wish to run in the same direction, for each loop of current is a magnetic dipole which will align in the same direction as a nearby dipole. Ampere thought that the currents canceled on the inside to result in a current running along the exterior because the sides of the circular currents cancel adjacent sides until only the outer shell remained, as in this diagram from Gibson’s student notebook. In fact, the electrons’ magnetic moments cancel when they point in different directions. All of the magnetic moments add up to generate the magnetic field, they do not reduce to a shell. Ampere also did not know how magnetization “started” these currents. We know now that the electrons have always been spinning, and always have a magnetic moment. It is simply a matter of aligning these spins to produce an overall magnetic effect. Ultimately, he is correct in thinking that magnetic phenomena are the product of electricity, for all of these ferromagnetic materials gain their magnetic properties from the motion of charges on an atomic level.
As for the deflection of the galvanometer needle, the galvanometer coil produces a magnetic field like so:
An external magnetic field exerts a torque on a magnetic dipole (such as the magnetic galvanometer needle) that is equal to the cross product of the magnetic moment and the magnetic field. Thus, the magnetic field inside the coil and surrounding the needle exerts a torque on the needle.
The black lines in the diagram on the left represent the magnetic field of the coil, whereas the green rectangle is the magnetic needle, with its poles marked, and its magnetic moment pointing from S to N. If you take the cross product of the magnetic moment and field vectors, the resulting torque vector points out of the page as in the right diagram. Thus, the magnetic field exerts a counterclockwise torque on the needle, causing it to rotate and align itself with the magnetic field of the coil. This is why the galvanometer needle deflects when current is passed through its coil.