What will happen when you write a bad check will depend on the amount the check was written for and whether you wrote the check by accident or knowingly.
If the check is under $500.00 then it's most likely a misdemeanor but you won't automatically get into trouble unless you don't actually pay back the bank and overdraft fees.
If you continue to write bad checks such as 5 bad checks in a 3 day period or the bad check is over $500.00 then it can become a felony and you could face 5 years or more in prison if you're found guilty of writing bad checks.