A dishwasher is essentially a watertight cabinet that sprays dishes with hot water and soap, drains out the dirty water, then dries the dishes.
A hot water supply hose hooks up to a valve that distributes the water to one or more spinning spray arms; a motor pump beneath the lower spray arm re-circulates wash water and pumps out the dirty water; and an electric heating element or a hot-air fan dries the dishes. All of this is operated by controls that may be very simple or quite complex.
Many dishwashers have an air gap attached to their drain line. Typically mounted behind the sink, the air gap prevents wastewater from being sucked back into the dishwasher. With a dishwasher that doesn't utilize an air gap, the drain hose usually makes a high, arching loop up under the countertop; this also prevents wastewater from siphoning back into the dishwasher.
TIP: The way you load your dishwasher makes a difference--dishes can block the spray arms or prevent the soap dispenser from opening. You may not be able to squeeze in every dish that needs to be washed; save some for a second load.
SAFETY FIRST:
1) Before working on it, always unplug the dishwasher from it's electrical receptacle or shut off the circuit that powers it.
2) Turn off the hot water supply valve beneath the sink before disconnecting or working on the dishwasher's supply valve or hose.
3) Don't work inside the dishwasher immediately following a wash cycle; various parts, especially the electric dryer element at the bottom, may still be hot.