An O2 sensor measures the amount of oxygen remaining in the engine’s exhaust stream. At the time of this writing, most cars are equipped with narrowband O2 sensors, which are only accurate over a narrow range. A wideband O2 sensor is accurate over a wider range, and is generally considered essential for DIY ECU tuning.
See also AFR.