Nuclear Magnetic Resonance (NMR) is a spectroscopic technique used to detect certain nuclei in a molecule.
1H and 13C are the most commonly identified nuclei , however nuclei with an odd mass number can exhibit an nmr spectrum (ie. 14N, 17O).
NMR works by exerting a strong magnetic force on the nuclei in molecules. The spinning nuclei (ie 1H) possess a magnetic field, which when acted on by the nmr field will align either WITH or AGAINST the applied magnetic field.
The with state is lower in energy than the against state. The transititon/flip from with - against is known as resonance. Resonance is the energy difference of these two states, and is characteristic of the nuceli. Therefore, from nmr resonance values, the nuclei type and the 'environment' it's in, can be determined.
The 1H environments will be the same in a methane (CH4) molecule, but different in CH3CH2CH2Cl and therefore the protons have different resonance values - these are plotted on a spectrum, against intensity and this is the NMR spectrum.