There are two reasons for using deuterated solvents in NMR experiments:
a) modern NMR spectrometers measure the deuterium absorption of the solvent to stabilize the magnetic field strength. As the observation frequency is field dependent, the deuterium receiver notices a field fluctuation through a change of the observation frequency ("lock frequrency") and can correct the field strength correspondingly. You call this the field/frequency lock. In principle one could use other nuclei for the lock, as was done earlier (e. g. 19F), but deuterium is the most convenient;
b) as there is always much more solvent than substance of interest in the sample to be investigated, one uses a deuterated solvent instead of the ordinary 1H-containing solvent to avoid the huge solvent absorption that would otherwise spoil the 1H-NMR spectrum.