An engine control module is a device that monitors a network of sensors in a car and performs necessary adjustments to the conditions when they are outside of the normal operating range. The module stores a code whenever it encounters a problem, allowing a mechanic to scan it later.
When the ECM detects a problem in the engine, it informs the driver by triggering the check engine light. As of 2015, most modern ECMs have a memory system, which allows dealerships to update the specifications and fix problems related to programming. The ECM is also in charge of calibrating the position of throttle when the engine is not getting any gas, which helps prevent uneven idle.