While IR spectroscopy provides information regarding the functional groups of molecules, NMR spectroscopy provides information regarding the number of magnetically distinct atoms of a specific type being studied (H NMR, for example)
How NMR Works:
NMR spectroscopy works because of nuclear spin, but not just any spin.
Any atomic nucleus that has either odd mass, odd atomic number, or both possesses something called Spin Angular Momentum as well as a magnetic moment.
What is Nuclear Spin?
What this means is that odd mass enables an element to have a spin property that can be detected (because of unequal electron sharing).
Here is an important formula to remember:
2I+1 (I is a spin quantum number) Example: A proton from a hydrogen nucleus has a spin quantum number I = 1/2 and has to possible spin states: [2(1/2)+1] = 2 Those 2 states are -1/2 and 1/2
Nuclear Magnetic Moments: