In California, you normally have to wait six months for a divorce to be finalized; but legal separation can take place immediately. Some will, therefore, get a legal separation right away and only later on get a divorce (OR, someone might not be sure yet if he/she wants to go through with divorce OR, separation and most of the legal protections that come with a divorce might be desired without technically ending the marriage.)
Some suppose that the difference between divorce and legal separation is that the former is permanent while the latter is temporary. But that is not correct. It is possible for a legal separation to be permanent, though it will not allow you to remarry.
Division of property, child custody and visitation, spousal support, and more can all be essentially the same in a legal separation as in a divorce, but without ending the marriage. One other major difference, however, is that a restraining or protective order often accompanies a filing for legal separation since this is often done due to alleged child and/or spousal abuse.