A legal separation is normally the first step in a divorce. In most, if not all States, you must be legally separated for some period of time (90 days is typical) before your divorce can be made final.
At the time of legal separation, debts and property are usually 'frozen' and made separate for each party. During a legal separation, if your ex goes out and runs up huge credit card bills (for example), you aren't responsible for them in the eyes of the court. (You may still be responsible for them in the eyes of the creditors, however.) You are also generally prohibited from disposing of (or converting) marital assets during this time.