http://en.wikipedia.org/wiki/Magnetic_resonance_imaging
The above link tells you pretty much everything you didn't want to know about MRIs. I had a brain MRI one time, I had to be sedated because I was afraid of it, they even have a little mirror in there so you can see out of it, sort of claustrophobic in the machine, and they had a microphone and radio in there so I could talk to the techs. When the machine started up, it was VERY loud, surprised me, kind of made a bumping racket.