Injunctions.
There are two main types of family law injunction; a non-molestation order and an occupation order.
A non-molestation order generally prevents another person from displaying forms of inappropriate behaviour towards you like threats, harassment, or harm. The exact terms can be set by the court and can even prohibit all communication or prevent a person from coming to your property, place of work or within a certain radius of them.
A power of arrest is attached to the order so that there are criminal consequences if the terms are breached. Whilst these are commonly used against former partners/spouses, they can be obtained against a variety of other connected people.