If children are involved, the parent who spends the most time with the kids, or who provides their primary care, usually remains in the marital home with them. If you don't have children and the house is the separate property of just one spouse, that spouse has the legal right to ask the other to leave.
If, however, you don't have children and you own the house together, this question gets tricky. Neither of you has a legal right to kick the other out. You can request that the other person leave, but you can't require it. If you and your spouse don't come to a decision, the court will decide for you during divorce proceedings or earlier, if you ask for a temporary order on the issue. (For more information, see Temporary Orders in Family Court: Quick Decisions on Support and Custody.)
If your spouse changes the locks or somehow prevents you from entering the home, you can call the police. The police will probably direct your spouse to open the door and let you back in. When you both own the home, the only time you can get your spouse to leave is if your spouse has committed domestic violence and a judge grants a restraining order.
Whatever you do, do not claim domestic violence has occured just to get your spouse removed from the home. (Some people have resorted to this extreme tactic.) Once a judge realizes this has occurred, the party claiming violence may be asked to vacate the home and the judge may be biased againt him or her during future negotiations. If you believe you are a victim of domestic violence, but are not sure, go to the Yellow Pages and call your local domestic violence hotline.
For detailed and practical advice about making financial decisions during divorce, see Divorce & Money: How to Make the Best Financial Decisions During Divorce, by Violet Woodhouse with Dale Fetherling (Nolo).