There are two kinds of orders being intertwined in this discussion. It's understandable. Even practicing attorneys have a tendency to use "restraining order" and "protection order" in Ohio interchangeably. Part of that is also due to other states using the term "restraining order" the way Ohio uses "protection order," which is often depicted in the media/TV and film industry. Let me give this a shot.
There are things called "restraining orders" that a judge issues to restrain the conduct of parties to a court case. The most common one you may know of is a gag order a judge may issue restraining the parties from talking to the press. There is little or no real "due process" involved in these orders, in that there is generally not a formal hearing with summons issued to the parties. It's usually an oral motion from a party during a hearing for another purpose, or the judge may issue the order on the court's own motion.
Then, there are other "restraining orders," which are issued as part of a civil case, and very often in divorce cases. In these situations, one party will make a motion (usually in writing) asking the court to order the other party to be restrained from doing something. This will often be a two-part motion, with the moving party asking for an interim order pending a full hearing on the motion itself. One that comes to mind is a party will ask for an order restraining the other party from disposing of any marital property in a divorce. The interim order will be issued, a copy of the motion will be served on the restrained party (or that party's attorney) and the court will hold a hearing on that motion.
The third is what we call in Ohio a protection order, which is the classic "restraining order" from TV and movies that is a court order prohibiting a person from coming near a protected person. This is a two part order as well. The petitioner will appear at court, be placed under oath, and provide sworn testimony as to why they are requesting the order. If the court finds that there is probable cause to believe that the petitioner is in imminent threat of harm, an interim order can be issued pending a full hearing. Whether the interim order is issued or not, nothing happens then unless/until the papers are served on the restrained individual. Service includes a copy of the interim order (if any) and notice of the full hearing. At the full hearing, the respondent (the person to be restrained) is entitled to appointed counsel. The petitioner can hire an attorney if they choose. The parties can enter a consent agreement, in which the respondent basically agrees to have no contact with the petitioner. If the respondent wants a trial, the burden is on the petitioner to prove by clear and convincing evidence that the respondent either has already committed a violent offense against them (like assault, domestic violence, sexual assault, etc.), or that the respondent presents an imminent and substantial risk to the physical or mental safety of the petitioner.
I have some experience with the first and third types of orders. The first from when I was a prosecutor, the last from my time on the bench, doing some protection order hearings. Never did divorce work, and SWMBO and I have been together since 97. So while I've heard stories like the poor guy watching his house get emptied by his soon-to-be-ex-wife with a deputy standing by, I've got no experience and can't begin to explain that.