Your circuit breakers are designed to prevent fires in the event of too much electricity running through various circuits. The breakers trip when too much power is being used by an appliance, such as your dishwasher. Several outlets will shut off and cease to work in your kitchen if the breakers have tripped and can be restarted by resetting the breaker at the breaker box. However, a breaker that consistently trips is an indicator of a bigger issue with the wiring in your house or apartment and should be inspected by a professional.
The dishwasher uses a motor to spin the spraying arms at the bottom of the machine's tub. The spraying arms shoot hot water, mixed with detergent, at your dishes to help remove stains, grease and grime. The motor may break over time due to constant wear or overuse and could require replacement by a technician.
Dishwashers are designed to only operate when they are shut tight. The door uses a combination of rubber gaskets and a latch to stay closed and prevent water from leaking all over your kitchen floor. The door latch is connected to a switch that automatically stops the dishwasher's rinse cycle the moment it disconnects, to keep water from spraying out. A dishwasher won't restart if the latch is broken, even if you've manually closed the door. You'll have to replace the latch to stop the door from disconnecting, the procedure for which varies according to model.
It's always possible that you simply haven't set the wash cycle properly. Many dishwashers have numerous settings and cycle times, and it's possible your dishwasher is only stopping because you have it set to have a longer drying time or for a quicker wash. Consult the manual pertaining to your particular model for specific instructions regarding the operation of your dishwasher.