If the couple has children, the one parent who provides the primary care for the kids is typically the one who will remain in the home. If there are no children involved and one spouse has sole ownership of the house, they possess the legal right to ask the other to leave.
In the case that there are no children involved and the house is community property (meaning both spouses have split ownership), neither have the right to kick the other out. It can be requested, but your spouse is not required to adhere to your request.