1.2. Spin and Magnetic Fields
As charged particles like nuclei and electrons spin they generate very small electric fields (magnetic moments) around themselves (Figure 1.3). These magnetic moments have directionality, but under normal circumstances are randomly oriented.

Figure 1.3 – Representation of Magnetic Moment Generated by a Generic Charged Particle and The Random Orientation of Moments from Multiple Particles.
If a powerful external magnetic field is applied the magnetic moments will align with that field (Figure 1.4). Two alignments are possible: parallel or antiparallel.

Figure 1.4 – Alignment of Magnetic Moments Parallel and Antiparallel to an External Magnetic Field.
Although small, there is an energy difference between the two states. Alignment parallel to the field is slightly more stable than antiparallel. As a result, slightly more nuclei will have this alignment (Figure 1.5). The exact energy difference depends on several factors.

Figure 1.5 – Energy Difference Between Alignment Parallel and Antiparallel Parallel and Antiparallel to an External Magnetic Field and Resulting Excess of Particles in one Alignment.
Nuclear Magnetic Resonance (NMR) spectroscopy takes advantage of this effect to determine useful information about the atoms in molecules of a sample.