Clean the filter
If your dishwasher is not self-cleaning, it most likely has a manual filter, designed to trap food debris. When the filter becomes clogged, the dishwasher continues to recirculate dirty water, resulting in small bits of stuck-on food and potentially smelly dishes.
The filter is located at the bottom of the machine, usually covered by a twist-off or snap-off cap. Remove the cover and then lift out the filter. Soak it overnight in vinegar to loosen deposits and then scrub it with an old toothbrush. For the best results, clean the filter every month or two.