Periodically clean the interiors of the machine with water, baking soda (half cup) and white vinegar (3 cups). Run the machine without load after filling water with the above substances. All residues and deposits formed inside will be removed. If necessary consult the company representative about the preventive maintenance. In the case of new machines make use of the free maintenance service offered by the manufacturers. Remember the adage "prevention is better than cure".
Even your average machine from Maytag, Whirlpool, GE and many of the other common brands eventually will balk at the neglect. Many times, these are basic repair issues. Replacing a band or pump, for example, is pretty easy to do. A good deal of the problems don't even require repair - a quick troubleshooting, like taking a kink out of a hose is all they need at times. If it is a little more problematic, affordable washing machine parts can be purchased for these same aforementioned brands on several internet sites.