A temporary restraining order has to be issued by a court. It's not clear from the question if there's a divorce pending (although with a new boyfriend I would assume so).
If there's a divorce pending, the wife would need to file a motion for a temporary restraining order and after a hearing the judge or court commissioner would decide whether to issue one. If there's threats and the wife feels at risk, she can ask for an emergency order (called an ex parte restraining order).
Below is a link to the Washington Courts webpage with the forms for a temporary restraining order. Once they are filled out, ask at the clerk's office at the courthouse exactly where to go to get them signed.