Magnetic resonance imaging is a medical diagnostic technique that uses radio waves to learn about the environment of hydrogen atoms in your body. As it happens, the hydrogen atoms do not respond to the radio waves unless there is a strong magnetic field present. Looking at the hydrogen atoms in your body gives the technician and the doctor information on any of the soft tissues of the body, since they are largely composed of water and contain lots of hydrogen atoms.
Nuclear magnetic resonance (NMR) is a technique that is very closely related to magnetic resonance imaging. The term "nuclear" refers to the fact that the radio waves interact with the nucleus of the hydrogen atom, or other atoms that you might be interested in studying. NMR spectroscopy is probably the most important tool available for determining the structure of organic compounds because it tells you what atoms are present and how they are connected to each other.