Nuclear magnetic resonance cna man different things to different people.
Most elements have at least one reasonably abundant isotope whose nucleus is magnetic.
The proton spin of the gydrogen nucleas imparts the magnetic properites to the water protons of the body. For MRI, the body is immersed in a static magnetic field, the spins of slightly more protons become aligned with the magnetic field than against it. A rapidly alternating magnetic field at an appropriate resonance frequency in the radio frequency regime, applied to a coil near the subject or specimen in the static magnetic field, changes the orientation of the nuclear spins relative to the direction of the static magnetic field. When the alternating oneis turned off, the nuclei return to the equilibrium state with the emission of energy at the same frequency as that of the stimulating alternative field. The nuclei of different elements, and even of different isotopes of the same element, have different resonance frequencies.