fNIRS is similar to fMRI. They both measure the blood oxygenation level response (BOLD), however the latter does this using infrared light.
The light used is NIR (near infrared) light, this has a wavelength of 750-1000nm, meaning it can measure the difference between oxygenated blood (absorbs light at above 790nm), and deoxygenated blood (absorbs light under 790nm).
Compared to fMRI, it is considered more useful for paediatric research, or for studies where movement is necessary. It is also less expensive and practical than fMRI.
Functional near-infrared spectroscopy (fNIRS) uses light-emitting diodes (LEDs) to emit light through the skull into the brain. The system also includes light detectors (sensors) that measure the amount of light absorbed at specific wavelengths.
This absorption varies based on the oxygenation state of the blood: oxygenated blood absorbs light near the infrared spectrum, while deoxygenated blood absorbs light at slightly lower wavelengths.
After the light detectors have picked up the absorption rate at different wave lengths, a ratio of oxygenated and deoxygenated blood can give an indication of which brain areas were active at a specific time point.
However, as the fNIRS works with electrodes, the spatial resolution is a lot lower compared to MRI (1-2 cm^3 compared to 1-2mm^3 of MRI). It is less sensitive to motion, so still considered an option for motion studies and a cheap alternative compared to MRI.