fMRI or 
functional Magnetic Resonance Imaging is used to non-invasively view the structure 
and activity within a brain in vivo.
An fMRI is an MRI that has been tuned to detect blood flow. Hemoglobin in blood contains iron, which--due to its ferrous component--  mediates changes in magnetic fields. These changes are, in turn, detected and converted to three-dimensional image data by the MRI.
That same iron component in hemoglobin carries oxygen to the cells of the body. When neurons become more active they require more oxygen-carrying blood. Arteries in the vicinity of the active neuron cells respond by dilating in order to increase the supply, and it is this extra blood that is detected by fMRI.
This has been a boon to understanding the topographical correlates of thought and brain function. That's the upside. The downside is that it produces very course correlates. That is, it only measures increased blood flow in the 
vicinity of neural activity. It doesn't pin-point the actual activity topographically.
It is also contextually course information. In other words, it displays 
all activity, and can't discern between, say long-, and short-term PTP, or any of the staggering number of other protein interactions that are involved in different types of mental activity. These different types of activity are often as important as locational activity.
Finally, it has a course temporal aperture as well. Because it measures blood-flow, it tends to show neural activity many milliseconds, or even seconds after the activity has started 
Another form of fMRI is 
fcMRI, which measures the functional connections of a brain.