The problem could depend on the brand of the dishwasher you have and possibly the model number of it too. If you can post that information we'll try to suggest something. You can find tips for locating the model number on your appliances in the 'Repair Parts' section of my site linked below.
One thing that could be a problem in any brand of dishwasher is a kinked or partially plugged drain hose or house plumbing connection.