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".
If, however, you're having trouble putting your finger on exactly what the problem with your machine is, it can be nearly impossible to devise an appropriate washing machine repair plan. In that case, you have three options: Put up with the problem and hope that it goes away, Get rid of the malfunctioning unit and purchase a brand-new one; or, Find a washer and dryer repair technician who can help you diagnose and treat the problem. Obviously, there are pros and cons for each of the scenarios outlined, so it will be up to you to consider your budgetary constraints and any other important factors before making a decision.