MRS works by detecting the magnetic properties of certain atomic nuclei. When placed in a strong magnetic field, nuclei such as hydrogen (1H), phosphorous (31P), and carbon (13C) resonate at specific frequencies. The resulting spectra provide information about the concentration of various metabolites within the tissue, which can be used to identify and characterize tumors.