In legal terms, trespassing involves violating someone's property rights. It means the trespasser has entered or set foot on property without the owner's permission. Your husband can't trespass if you're married and you don't have a court order directing him to stay out of the house. It's his home too, and he has a right to be there unless the court orders otherwise.
Before allegations of trespassing can have merit, a court must legally award you exclusive use of your home. This doesn't remove your husband's ownership rights. The order simply states that you're entitled to live there and he is not. After you have such an order, you can legally change the locks and your husband cannot access the property without your permission. This is true even if the court orders him to pay the mortgage, and most or even all of his personal possessions remain in the residence. He has a right to his property, but he must make arrangements with you to retrieve it.
Requesting an Order
You must file a motion with the court to initiate proceedings before a judge can rule on issues regarding the marital home. The requirements for this vary from state to state, but you would generally do so as part of a divorce action. In South Carolina, this necessitates a temporary hearing, and the order governs until your divorce is final and the judge decides who gets the residence. The order can carry over post-divorce, however, if the court decides you and your spouse must continue co-ownership of the property for some reason. Some courts, such as those in New Jersey, are more reluctant than others to issue orders for exclusive possession, so your motion will likely require a plenary hearing, which is much like a trial.
Courts generally do not issue orders for exclusive occupancy without a good reason. If your spouse has moved out, he's established a status quo, and a judge might be reluctant to disrupt that by allowing him to move back in. This is particularly true if you have young children who might be affected by the upheaval. Otherwise, you would have to prove that the friction between you and your husband is so great, it's unsafe and unreasonable to expect you to continue to reside together.
Domestic Violence Issues
You don't have to file for divorce first to get a restraining order if domestic violence is an issue in your marriage. A restraining order can remove your husband from the home and prohibit him from returning while you're in residence. You must prove physical or threatened violence against you or your children, however. If you get a restraining order and your husband comes to the home, he's violated it. This can have criminal ramifications that may be more serious than a trespassing charge.
If the court awards you exclusive use of the marital home either during or after your divorce, you can contact the police and level charges of trespassing if your husband forces his way into or onto the property. You would have to produce a copy of your court order for the officer. You can also go back to the family court that issued the order and file a motion against your husband for contempt. In both cases, the court can impose penalties such as fines, jail time or community service.