Nuclear magnetic resonance (NMR) spectroscopy gives information about the
hydrocarbon skeleton of organic molecules through the protons (hydrogens) on the carbons (
1H NMR spectroscopy)

Certain
nuclei, of which
1H is an example, behave as though they are
spinning magnets. When an
external magnetic field is applied, such nuclei adopt an orientation either
aligned with the external field (lower energy, as in the image) or
opposed to the external field (higher energy).
If the molecule is exposed to
electromagnetic radiation of a frequency equal to the
difference in energy between spin states,
absorption of that energy results in some nuclei in the lower energy state
flipping to the higher energy state.
Roll your mouse vertically between the spin states in the image to see the nucleus flipping.At a particular magnetic field strength the
difference in energy between the two spin states depends both
on the nucleus (1H), and
on the molecular environment of the nucleus.
NMR
spectra show the range of absorptions for a particular molecule. In practice NMR spectra are determined by exposing the sample to a constant electromagnetic field and varying the strength of the magnetic field. Conditions can be chosen so that the spectrum shows absorptions due only to the hydrogens in the molecule (
1H NMR), as opposed to other NMR-active nuclei (for example,
13C NMR).