That's a pretty broad question. I assume you're asking what happens if you write someone a check on your account that has been closed.
When the person who receives the check tries to cash it, the bank will probably tell them the check is no good. If the person deposits it to their account (or cashed it at their own bank), their bank will send the check back to them and remove the money from your account.
If you wrote the check knowing the account was closed and there wasn't enough money to cover it, you could be charged with a criminal violation of Penal Code §476a. It is a "wobbler," meaning the District Attorney can charge it as a misdemeanor with a maximum punishment of a year in jail, or a felony that carries up to three years in state prison. (If the total value of all checks written is less than two hundred dollars, and you have never been convicted of writing bad checks or other qualifying theft-related offenses, it is a misdemeanor with a maximum punishment of a year in jail.)
Many counties have a diversion program, where people who write bad checks can avoid prosecution by taking a money management class and paying off the bad checks, plus interest and fees.