First off don't worry---I have been in this same situation before and yes, its a pain, but its not the end of the world.
First----depending on your bank, they might pay all of your outstanding checks/debits and just overdraw your account and charge a fee for whatever checks/debits caused the overdraft. So your account would have a negative balance until you deposited more money.
Second---if the bank does not pay the check/debit that there wouldn't be enough money for, they will charge you a returned check charge and send it back to the company that deposited it. That company will either re-deposit it in a few days or not re-deposit it and contact you. That company may also charge you a fee as well for a returned item.
If the check/debit is returned you will no doubt know about it before the other company does. You can call them and explain the situation and ask them their policy about returned items, tell them when you can make it good with them and then keep your word.
Where you can get into big trouble is if you do not pay items that are returned.
Don't feel stupid, just work on not doing it again. Good luck!