You use it all the time and don't give it a second thought
Behind the metal exterior, a washing machine is basically a basin that holds water, a motor that controls an agitator and turns the basin, and a set of paddles within the basin that agitates the clothes. A set of hot and cold water lines provide water to the basin and a control unit allows the user to set various operational settings. Sometimes a washer dryer assembly appears as one stacked unit that contains both the washing machine and tumble dryer in one unit. Typically, the washer and dryer are separate units.
The user-selectable control unit is attached to a timer. When the user selects a wash setting and begins a wash cycle, the timing mechanism controls the operation of various assemblies within the washer. These assemblies include the hot and cold water supplies, the motor, and the water discharge assembly.
The basin should be filled with water before detergent and clothes are placed into the basin. There are two reasons for this. A full basin is measured by the manufacturer before clothes are placed in the basin. If clothes are placed in the basin before water is inserted, they will displace some of the water, which will result in a deficiency of water. The second reason is that placing laundry detergent directly on clothes is very hard on most fabrics. Dilute the detergent in the water before placing the clothes in the basin.
The basic operation of a washing machine is simple. It fills the basin with water and activates a motor that churns the agitator, which forces the clothes to roll within the basin. The agitator pushes the clothes down in the middle of the basin and causes the clothes to rise from the outside basin walls. This causes a rolling motion within the water and is an important function during the cleaning process. If the basin is too full of clothes, this rolling function will not occur and the cleaning quality will be impeded.
Eventually the water is released from the basin. When this happens, the timing control opens a valve in the discharge assembly and water flows out of the basin to an external drain, typically a sink or waste line. At the same time, the motor spins the basin, which forces water outwards towards holes on the outer walls of the basin. The basin is actually comprised of two drums, one with holes, and another you can't see that holds the water. Water flows through the holes of the inner drum into the outer drum and then discharges out of the washing machine.
The rest of the machine's operation is based on a reuse of these concepts. The control unit operates the water lines, starts and stops the discharge unit, and controls the spinning of the drum. This is basically how a washing machine works.