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.