Clean your washing machine with a washing machine cleaning solution. Follow the package directions for how to use the product. It will remove any mold or build up that may cause the clothes to smell.
Spray your towels and any other smelly clothes with white vinegar. Let them sit for five minutes before you put them in the washing machine.
Cut your laundry detergent use in half. The recommended amount on the box is usually more than necessary for cleaning a load, and the soap can gunk up your machine.
Stop using liquid fabric softener. This can also clog up your machine.
Add 1 cup of white vinegar to the rinse cycle to act as a fabric softener. Add five drops of your favorite essential oil to the vinegar before you pour it in.