A dishwasher is an automatic device that washes and cleans dirty dishes; All one has to do is load the machine, add detergent, set the wash cycle and press the "on" button. But the dishwasher also performs some special actions by itself, which include:

It fills itself with water.
It sprays water at high speed and pressure through fountains to clean dishes.
Drains dirty water.
It rinses the dishes by splashing more water.
It heats the air to dry the dishes; Of course, if you asked to do this part when setting up the device.
In addition, the dishwasher monitors its operation so that everything runs smoothly. A timer sets the duration of each cycle; One sensor shows the temperature of the air to prevent the dishes from overheating and destroying them, and another sensor can tell that the water level is high enough to start the washing and draining phase.

Some dishwashers have sensors that determine the level of dirtiness of the water that drips from the dishes, and when the water is clean enough, the dishwasher knows that the dishes have been cleaned.