When you wash your dishes by hand, the water and soap stays still in the bowl or sink and you move the dishes around as you scrub them with a cloth or a brush. In a dishwasher, the opposite happens: the dishes and cutlery stay still in plastic baskets while pressurized jets of hot water shoot all around them.
A dishwasher starts its cycle by taking in cold water from a hose connected to the machine. Once a certain amount of water's sitting inside the bottom of the machine, a heating element starts to warm it up. The element is just a thick metal bar that gets hot when an electric current passes through it, and it gradually heats the water during the first part of the wash cycle. An electric pump takes the warming water and forces it up pipes in the side of the machine, which are connected to two spinning paddles. There's one paddle, made of metal, underneath the bottom rack of dishes and another one, made of plastic, under the top rack.
When water enters the paddles, it makes them spin around much like garden sprinklers. As the paddles rotate, the water emerges from small holes in their upper surface. The paddles make lots of hot spinning jets of water that fire upward onto your dirty plates. (That's why it's best to arrange your crockery so the dirty surfaces are facing downward.) The bottom rack and the bottom paddle are nearer to the heating element so the water is much hotter in the lower part of the machine. (That's why you'll see some crockery items marked "Top rack dishwasher safe"—which means it's alright to put them in the upper, cooler part of the machine.) After the water hits your dishes and plates, it falls back to the bottom of the machine, where it's heated up once more by the element and pumped round again for another cycle. Water pumps around the machine for half an hour or so until all the dishes and plates are clean. A sieve at the bottom of the machine catches any large bits of debris (to stop the machine jamming up), while smaller bits (and food remains) simply flush down the drain.
What gets the dishes dry at the end of the cycle? The water that washes them is so hot that it simply evaporates away in the heat. As long as you don't overload your machine, the dishes should dry naturally with no need for you to wipe them afterward.