The short answer is “equitably.” You get what you had before the marriage, they get what they had before the marriage, and the rest of the stuff is fairly divided. That is to say, the Court is required to strive for a division that is fair and equitable to everyone involved. This does not mean that it has to be a 50/50 split, but it often ends up being close to that. In most cases, as long as it’s not suspiciously unfair to someone, the Court will approve whatever arrangement the parties agree on.
It is only in those cases where the parties refuse to cooperate and work out an arrangement that the Court has to step in and turn it into a long, complicated, and expensive process. The Court has to look at everything, label everything, value everything, and then divide everything in an equitable manner.