If you have been charged with a crime, or if someone has filed a restraining order against you, you will have to go to court for a hearing.
At a hearing, both sides will present their evidence and arguments to the judge. The judge will then make a decision about the case. If you are facing criminal charges, the judge will decide whether or not to convict you. If you are involved in a civil case, the judge will decide who wins and how much money they should get.
Both sides will have an opportunity to cross-examine witnesses and present their own witnesses. After both sides have presented their evidence, the judge will make their ruling.
If you are convicted of a crime, you may be sentenced to jail time, probation, or fines. If you lose a civil case, you may have to pay damages to the other side.