Issued before both sides are heard
In New York family matters, the temporary version is usually called a temporary order of protection. A judge can issue one at the first appearance based on the petitioner's account, without the other person present, and it stays in effect until the court revisits it, which often happens more than once as a case is adjourned. The temporary order is enforceable once the restrained person has notice of it. It is not a finding that anything happened, and the respondent will have a chance to respond at a later date.
The next court date matters
If you are the person restrained, the next court date is the first real opportunity to be heard, and missing it can lead to the order being extended or a final order entered without your input. Bring the papers you were served, any messages or records that bear on the allegations, and information about any custody, criminal, or housing matter involving the same people. Ask your lawyer how to retrieve belongings through a police escort or another court-approved method rather than going back on your own. If you are the protected person, bring the same kinds of records along with anything new that has happened since the order was issued.
The lawsuit version of a TRO
Outside family matters, a temporary restraining order is an emergency order in a lawsuit, for example to stop a business partner from moving money or a former employee from using confidential data, pending a fuller hearing. Those orders follow civil litigation rules and usually require a showing of immediate harm. If your search was about that kind of order, the issues are different and timing tends to matter even more. We start by identifying which kind of order you have or need, and then what has to happen before the next date on the calendar.