If your dishwasher won’t drain, you'll have to fix it before you use it or it will overflow. The single most common reason for this problem is a clog in one of the drain lines that connect the dishwasher and the garbage disposal to the main drainpipe. You may also have a dirty air gap or strainer. In order to fix a dishwasher that won’t drain, you must clear the debris from all of the components. First, cut the power to your dishwasher to avoid injury.
The air gap is connected to the garbage disposal and the dishwasher via a "Y" connector; either of these hoses could be clogged, which would prohibit the dishwasher from draining. The air gap is located under the sink at countertop level. It is usually a chrome cylinder with a domed top that sits toward the back of the sink. Remove the cover and clean out the inside of the air gap with a wire brush and flowing water.
After cleaning the air gap, look to the drain hoses. You can remove both of the hoses that are linked via the "Y" connector and flush them out with running water. The hose connected to the disposal is particularly susceptible to blockage. If any of the hoses are heavily blocked, consider replacing them entirely by purchasing new hoses at your local home store.
The dishwasher strainer is meant to capture large pieces of food in order to prevent blockage in the drain lines. However, if particles accumulate in the strainer, the water won’t be able to drain. Check with the manufacturer of your dishwasher to learn how to properly remove the strainer, as the technique is different across many brands. Once you are able to remove the strainer, clean it with a soft brush and running water, and then replace it.