Vinegar can be added to a dishwasher in several ways, by pouring it directly in the bottom of the dishwasher, in a container on the top rack or by adding it to the rinse aid compartment.
Fill a dishwasher-safe container with 1 cup of white vinegar, and place it on the top rack of an empty dishwasher. Run the dishwasher through the hottest water cycle possible. After the cycle you should notice food and debris have been washed away along with any odors that may have been present. Note that you may also use a package of unsweetened lemonade mix or baking soda to achieve the same result.