Summarize the following:
Before you begin cleaning the washing machine, make sure the machine is completely powered off. Just to be on the safe side, you may want to consider unplugging the machine from the electrical outlet. Cleaning the machine while it is still on could create a dangerous situation for you or damage the machine. Accumulation of mold and mildew on the components of the washing machine is a major cause for unpleasant odor. Use a clean sponge or washrag to wipe down to exterior surface of the machine. Make a mixture of 1  c (240 mL) warm water and one tablespoon of bleach and dip the sponge in it. Be sure to wring out any excess water before you begin scrubbing.  You should wear rubber gloves any time you are handling bleach cleaning solution. Try to get the bleach cleaner in all of the cracks and crannies of the washing machine. You can use a Q-tip dipped in the bleach/water solution to get into really hard-to-reach areas. Get rid of any dirt or grime from the washing machine gasket and the seal at the opening of the machine. Remove the gasket and use a damp cloth or paper towel to scrub away any residue. You can also add a tiny bit of bleach cleaning solution to warm water and use this to clean it.  A dirty seal is one of the biggest problems that leads to odor in washing machines. Cleaning this regularly can really help a lot.

Summary:
Unplug the washing machine. Wipe down the outside surface. Clean the gasket and seal.