1H NMR spectroscopy involves the interaction of magnetic fields with the nuclear spins of hydrogen atoms. When a sample is placed in a strong magnetic field and exposed to a specific radiofrequency, the hydrogen nuclei resonate at characteristic frequencies. These frequencies provide insights into the molecular structure and the electronic environment surrounding the hydrogen atoms.