Functional MRI is a technique used to appreciate cortical activity.
It does so by measuring minute changes in cerebral blood flow that occur when an area of the cortex activates in response to a stimulus or activity.
Subjects are exposed to paradigms, which are a protocol of stimuli or activities designed to elicit a specific response from the brain, and active areas on fMRI can be mapped in this way to a certain function.
fMRI can be used clinically before surgery to find areas of important cerebral function, called “eloquent” areas (eg. the areas for language), in order to avoid damage to them during the procedure.However, fMRI is most often used in research to discover novel connections between brain areas and their functionality.
Read more here.