NMR spectroscopy operates on the principle that certain atomic nuclei resonate at specific frequencies when placed in a magnetic field. This resonance is detected and translated into a spectrum, which provides detailed information about the molecular structure and environment. In epidemiological studies, NMR can be applied to various biological samples such as blood, urine, and tissue extracts to analyze their metabolic profiles.