Functional Magnetic Resonance Imaging (fMRI) is a flexible set of techniques that image aspects of blood flow to measure regional variations in brain activity. Task-specific patterns of activity can be derived using a wide variety of perceptual, emotional, or cognitive task paradigms, or alternatively, baseline brain function and connectivity within brain networks can be assessed by resting-state fMRI (where no task/stimuli are used). Both methods can be sensitive markers of drug effects in healthy volunteers or patient groups. fMRI provides whole-brain, systems-level information, which can be closely tied to clinical outcomes, with the selection of an appropriate task and experimental design. Modern analysis techniques based around machine-learning algorithms are showing great promise in identifying potential biomarkers of disease states from fMRI data.