In the U.K., a restraining order is the outcome of a criminal prosecution. To get one, you first have to report the offender to the police and press criminal charges.
If you are a victim of stalking, harassment or family violence, then a restraining order could be a way to protect yourself from further harm. These orders are court orders issued by a judge at the end of criminal proceedings to prevent the defendant from contacting or approaching the victim of his crime. In the U.K., a criminal prosecution is necessary in order to obtain a restraining order. To get one, you first have to report the offender to the police and press criminal charges. An alternative is an injunction, which is a non-criminal type of relief available in family conflict situations.
TL;DR (Too Long; Didn't Read)
It is not possible to get a restraining order yourself. Unless the police are involved, you'll have to look at other options, such as an injunction.
Reporting the Crime
If someone is engaging in criminal conduct of any kind and you think you might need a restraining order, the first step is to report the offender to the police. Keep a log of any harassment, threats or violent behavior and be sure to report all incidents, no matter how minor they seem. There must be compelling evidence that you are in danger to issue a restraining order, so give the police any proof you have such as voicemail and text messages. For your own safety, do not engage with the offender or answer his calls.
Once you have reported the crime, the police and Crown Prosecution Service (CPS) will determine whether there is enough evidence to prosecute the offender and seek a restraining order at sentencing. The CPS can request a restraining order even if the offender is found not guilty of a criminal offense. The defendant has the right to challenge the application, however, and he must be told of the contents of the restraining order and what it demands of him.
Length of Restraining Order
It's up to the judge to determine how long a restraining order should last. Some judges will grant the order for a specific period, such as one year. Others will allow it to run indefinitely until a court decides to end it. Violating or breaching a restraining order is a criminal offence. The offender can be fined or face up to five years in prison.
Solutions That Don't Require Criminal Proceedings
Where a family member, partner or your child's other parent is harassing or abusing you, and you need a emergency solution, it may be more appropriate to seek an injunction. This is an order equivalent to a restraining order but it doesn't require criminal proceedings. There are two types of injunction in a family law context. A "non-molestation order" stops someone threatening you, and an "occupation order" prevents the person who abused you from coming anywhere near the family home. Victims of domestic violence typically seek occupation orders if they wish to return home without their abuser living or visiting there.