It is common for a divorcing couple to decide about dividing their property and debts themselves (with or without the help of a neutral third party like a mediator), rather than leaving it to the judge. However, if a couple cannot agree, they can submit their property dispute to the court, which will use state law rules to divide the property.
Courts divide property under one of two basic schemes: community property or equitable distribution. Debts are divided according to the same principles.
Division of property does not necessarily mean a physical division. Rather, the court may award each spouse a percentage of the total value of the property. Each spouse will get personal property, assets, and debts whose worth adds up to his or her percentage. (It is illegal for either spouse to hide assets in order to shield them from property division.) Nolo's Divorce & Money book can help you learn more about dividing money during divorce.