Basically they stick you in a strong magnetic field. Then they "pulse" another magnetic field to line up all the protons in the portion to be imaged. When the pulse goes away, the protons "wobble" in their spin. This generates electromagnetic waves that can be detected. They use the waves to make a map of the density of protons. Most of you, even your brain, is water, which has two protons. However other tissue may have even more protons (actually hydrogen nuclei, protons in other atoms don't behave quite the same way.) This generates a "density image" that is three dimensional. although it's usually presented as a series of "cuts" through whatever part they are looking at. I've had two MRI's. One on my back/spine, the other on my shoulder. Even with a weak signal, caused by my bulk, it was amazing what you could see in the spine image, I never saw the other one, but they tell me I have a calcium deposit. Had surgery on the back, but just physical therapy for the shoulder.
thanks