Modern vehicles are equipped with control units (ECUs). In addition to the engine control unit that controls, among other things, the injection and ignition, in most cases dozens of other control units are available, each of which has its own function. Think of an ECU for the automatic transmission, the climate control, the lighting and signaling system, but also each door that is equipped with its own ECU.
The interface electronics in the ECU translate the incoming sensor signals into a digital message. The processor reads this digital message and processes it into memory. The processor executes instructions, comparing the data in the memories and generating an output. From a map, for example, the times for fuel injection and ignition are determined from the received sensor information (think of the accelerator pedal position, underpressure in the intake manifold, engine speed and temperature). The process control provides feedback, with which the process is adjusted: the moment too much fuel is injected, this is measured and fed back to the ECU, and the injection time is reduced by means of the fuel trims.