Magnetic resonance imaging is the imaging application of NMR spectroscopy. It is notable because its full title should be "Nuclear Magnetic Resonance Imaging", due to the fact that the effect works on the nuclei of atoms. However, the "nuclear" aspect is dropped in the medical application in case patients are confused and think that they are experiencing radiation from radioactive materials.
In an MRI scanner, a patient is placed within a strong magnetic field and subjected to low frequency radio waves. The hydrogen nuclei (protons) in the body are then detected and transformed into an image which can quickly and easily distinguish sections of the body (such as those with high water content and those with high fat content). Trained doctors can then use the images to diagnose the patient.
The technique also has some chemical applications, such as determining the location of chemical components within a test tube to determine whether the reaction is photochemical or thermal in nature.
 Brain scans
Because of its completely non-invasive nature, MRI makes a brilliant tool for probing activity in the brain. Functional MRI, or fMRI has become the dominant tool for this since the 1990s. This means scientists can look inside the brain and see what is going on when someone makes a decision or a particular thought. At least this is the quick and easy pop science definition as used in the media to trumpet great advances in neuroscience. There is more to it than this, however, and some caveats need to be known before you can go on and on about how brain structure relates to whether you're a Democrat or Republican.
- Firstly, fMRI doesn't measure "brain activity." It measures blood flow in the brain, and effectively the rate of oxygen consumption, which is used as just a proxy for "brain activity."
- The results are basically that stimulus X causes "brain activity" in area Y. This is interesting, and useful for functional hypotheses, any dramatic conclusions made in the name of fMRI research that go beyond this need to be treated with some caution.
- Results are nothing more than a broad correlation. Hopefully something this obvious doesn't need to be stated.
- Usually the final crystal clear results presented in the newspaper's token science section is combining months or years of dozens or hundreds of people. The results are always statistical averages simply because the MR effect is so weak and with a high degree of error.
So, providing you understand those four points, you can talk about fMRI brain research. It's interesting, but it's not magic.
 Nails and noses
In 2009 it was reported that a man coughed up a missing nail after entering an MRI for a scan. The story was widely repeated from Boing Boing to Fox News. However, the story is likely to be a hoax, not least because it doesn't appear in any medical literature but also because the original KKTV report came on April 1st. MRI scans are often preceded by X-Ray images to check for any shrapnel or metal objects, and this would have picked out the metal object quite easily. Even otherwise, the strong magnetic fields acting upon the nail would surely have killed the patient. The story does bear some resemblance to a 2005 report from the journal Neurology, where a 22 year-old nail (apparently from a homemade nail gun) was found to be the cause of a man's constant seizures.