NMR is a powerful technique that has had a huge impact in a range of scientific disciplines. When an atomic nucleus is placed in an external magnetic field there is an interaction between the nuclear magnetic moment of the nucleus and the magnetic field. Because the magnetic moment of the nucleus is quantised the nucleus reacts to a radiofrequency field at a specific frequency which corresponds to the energy of the transition between the quantum states of the nucleus. This is called the Lamour frequency and is directly proportional to the strength of the magnetic field.
It is the dependence of the frequency on the magnetic field that gives NMR such a direct insight into the molecular state of matter. An antenna (usually a coil) is placed around the sample to irradiate it with radio waves. Nuclei in the sample absorb these radio waves and then re-emit the radio waves at the Lamour frequency which can be detected by the antenna.
Only nuclei with non zero magnetic moment can undergo NMR. Such nuclei must have an odd number of protons or neutrons (e.g. 1H, 13C, 15N, 31P, 19F).