Having your bank account frozen means that you're no longer allowed access to the funds that are in that account. This can be a major inconvenience to many people, but especially to those who live paycheck-to-paycheck. There are very definite steps that have to be taken before your bank account can be frozen, though, and when that happens you should receive notice so that you can plan accordingly.
The first step of getting someone's bank account frozen is for a plaintiff to file a case against the person who owns the account. This case must be in regards to unpaid debts. For instance a credit card company could file a case against someone who hasn't been paying their bills in a reasonable amount of time (reasonable determined by the court). Cases could also be filed between individuals, such as when there's a written agreement between two parties that a debt will be repaid by a certain date, but the debt is never repaid.
Once the case is filed with the court it has to be decided on. Notices should be sent out to the defendant that there has been a case filed against him along with what date the case will be heard on. The defendant would be best advised to get a lawyer and to defend him in court, but unlike a criminal trial this isn't necessary in all cases. If the court finds in favour of the plaintiff then it will order the defendant to pay the debt. Part of this order may be to freeze the defendant's bank account after the judgment is won.
Once the judgment is won, the court will draft a legal order to freeze the defendant's bank account (if that's deemed necessary by the court). This notice is then taken to the defendant's bank (often the order is mailed, but the court calls the bank first to begin the process). The bank in turn freezes the defendant's account or accounts and holds all assets in them until they are told to do otherwise by the court. In order to get your bank account unfrozen you will have to deal with the plaintiff's attorney and come to some agreement.