It is best to troubleshoot a washing machine starting with the simplest things first, then moving on to more problematic issues. At that point, the owner can decide if the repair can be done at home or if professional help is needed.
The first thing to check is the power. The plug, cord, outlet and wall outlet should be checked first, and then fuses and circuit breakers. If none of these seem to be the culprit, the next step is to move on to the water supply. The hoses and knobs that feed a washing machine can easily be kinked or moved, so ensuring that these things are in the right location can help figure out what's wrong. If the machine has a water-saver button, this should also be checked to ensure it is in the correct position.
If those things don't work, properly cleaning the machine may help to solve problems. One way to do this is to fill the washing machine halfway with water, but no clothes, then add 1/2 cup of baking soda or 3 cups of white vinegar. The cycle can run and complete, leaving the machine clean, but it's a good idea to run an empty cycle just to make sure it is rinsed thoroughly. If the machine is still having problems, a call to a repair technician is the next step, as the washing machine needs to be opened up.