Heather Zeiger (28 April 2012) explains, first, how it works here:
Functional MRI involves imaging the brain while it is thinking or operating, hence the “functional” part of the name. Based on the assumption that blood flow correlates to the particular part of the brain that is operating, fMRI produces images of where an increase of blood flow occurs.
fMRI still measures hydrogen nuclei, but this time the environmental change is based on whether the hydrogen nuclei are near oxygenated or deoxygenated hemoglobin (i.e., blood). And remember, the theory claims that oxygen is related to metabolism which is related to blood flow which is related to neural activity. There is approximately a six-second delay between neural activity and an fMRI reading because of the lag in the brain’s response to oxygen consumption and subsequent blood flow to re-supply the oxygen.