In case of a dangerous reading from a engine sensor, the indicator lamp starts to illuminate. In fact, most cars produced nowadays have the basic indicator lamps to show potential problems.
For all functions of the automotive engine, a sensor is there to transmit signals to the dashboard. The need of a system of warning lights and indicators is to allow the driver to understand how the engine is operating.
The sensors are usually programmed to send a signal to the indicator lamp when there is a non-standard sensor reading. This signal illuminates the warning light, telling the driver that there is a problem with the engine.