The dishwasher does not necessarily have a mechanical malfunction if it does not drain properly.
1. Inside the dishwasher at the bottom of the unit there is what looks like an upside-down cup. This is the float or pressure switch. Gently attempt to move it; it should move up and down freely. If any large food particles, glass, plastic, etc. have become lodged under this switch, remove them so the unit can function properly.
2. If the float switch is functioning properly, then there may be a clog in the air gap. This is the hose that runs under the sink from the dishwasher to the cap on top of the sink. There may be an obstruction in the line or in the air gap itself. Remove the cap on the sink that exposes the air gap. If you see an obstruction (i.e., food particles, etc.), remove them. If no obstruction is visible, the top of the air gap should pop off or unscrew. Remove it to find out if you can see any other obstruction. If still no obstruction is visible, invert a plastic cup over the air gap opening (making sure the cup is suctioned tightly to the sink) then advance the dishwasher timer to the drain cycle to start pumping water through the line. If the obstruction is in the line, it should be pressurized out of the air gap opening. Be sure to keep your hand on the cup to prevent the water pressure from pushing it out of place. If the water runs through the air gap, shut off the dishwasher and reassemble the air gap.
3. If the disposal was recently replaced, the installer may have failed to remove the plug on the side of the disposal where the drain hose connects, preventing the unit from draining. This plug normally requires a special tool and can be rather difficult to remove. To prevent damaging the unit, contact the installer directly to remove the plug.