Magnetic Resonance Imaging (MRI), a type of Nuclear Magnetic Resonance (NMR), is a method of obtaining cross-sectional images (slices) of internal soft bodily tissue. Invented in 1977, it has allowed much more accurate diagnoses of neurological conditions like multiple sclerosis because it allows doctors to "see" right into the human brain and other organs. It can readily differentiate between normal and demyelinated white brain matter, something that was very difficult to accomplish on older technologies like CT scanners. MRI scanners are also far less harmful than CT scanners.
Basically, MRI works by applying an extremely powerful electromagnet over a central core in which the patient lies. The magnetic field makes water molecules (which have a slight magnetic charge polarity) wobble like a miniature child's top. This, in conjunction with radio waves can be used to produce very detailed and high definition images (slices) of the brain. MRI scanners can also be used to image the spinal cord, but it is much harder to obtain images of lesions here due to obstruction from the vertebrae and the much smaller diameter of the spinal cord.
I'll discuss how MRI scanners work in more detail below.
To gain better contrasts in the images, contrast agents such as Gadolinium are often injected intravenously. Often both a normal scan and a contrasted scan will be done one after another. Gadolinium is a non toxic substance which does not contain iodine and has practically no side effects.
Radio waves are of a relatively low frequency and are thus harmless. There is no evidence at all that exposure to magnetic fields are in any way harmful, provided that you do not have any magnetic materials on or inside your body.
"Open" MRI scanners are a new variation of the traditional machines, but differ in that the patient does not have to lie in a tube. This is very good news for those of us who suffer from claustrophobia (fear confinement in small spaces).
What do you have to do and not do if you are having an MRI scan
What you have to do during the scan
An MRI scan can take anything from 15 minutes to one hour. You will be asked to lie on a tray that will move in and out of the tube on motors. The process is completely painless. However, it is important that you lie as still as possible during this time. For most people this is a very boring time, for others, claustrophobics especially, it can be rather stressful. Meditative techniques can be very useful and help relieve the stress and pass the time. Some hospitals will play music to you during the scan. Some radiographers will even chat to you.
How MRI scanners work (Thanks to Jeff Bacom for his help in writing this.)
The patient's molecules resonate (precess - much like a top wobbling) around the main magnetic field which is static. There are other electromagnets called gradient coils within the main magnet that alter the magnetic field across the patient in the three planes, x, y, and z.
The hydrogen molecules in the patient precess at different frequencies according to the magnetic field strength of the magnet measured in Tesla - 42.57 MHz equals one Tesla. At these frequencies, radio frequency (or RF) is applied and the molecules resonate or precess in larger circles around the main magnetic field.
It is the combination of all these precessing hydrogen molecules that are picked up by a receiver coil and translated into data. The signal that is obtained is actually a result of electromagnetic induction - since the hydrogen molecules with their one proton behave like tiny electromagnets when spinning near a coil, they induce a voltage in that coil (a very tiny voltage).
The RF is only used to excite the molecules. The magnets do not spin - in a CT scanner, the x-ray tube spins about the patient but not in MRI as the magnetic field changes in strength, and of course there is no x-ray tube.
The loud banging you hear is the actual voltage hitting the gradient coils. The gradient coils make use of very high voltage and actually cause the coils vibrate when it is turned on.
All of this resonating and RF application is responsible for the mild heating effect that some people experience while having a scan done. The amount of heating that is allowed in a human is referred to as the SAR rate and it is regulated by the FDA. A scanner will not apply more RF than is allowed by the FDA.
Sequences are constantly being developed that push the scanner further and faster - the SAR is one limiting factor.
The Basics of MRI
How Magnetic Resonance Imaging (MRI) Works
Basics of NMR
NMR Knowledge Base
Concepts in Magnetic Resonance