If your dishwasher won’t drain properly, you could have a problem that needs a professional to come and check it out, or you may have a fairly simple problem like a clogged air gap. The air gap is a device designed to keep the water in your sink from going into the dishwasher.
If you have one, its a small round device right next to your faucet. It is very easy for this to get clogged, especially if you don’t scrape the larger food items on the dishes into the trash before putting them in the dishwasher.
Here is a video that shows hoe to check it for blockage