The examination of facts and law presided over by a judge, magistrate, or other person with authority to hear the matter (such as a lawyer appointed to hear the case). Trials begin with the selection of a jury (unless the case will be heard without one), followed by opening statements by each side if they choose to give them. (The defense may also give an opening statement just before it presents its case.) The plaintiff (in a civil case) or the prosecution (in a criminal case) presents its side, then the defense puts on its case. Sometimes the plaintiff or prosecution presents more evidence, called rebuttal evidence, as does the defense. Following closing arguments, the jury (if there is one) is instructed by the judge on the law they must apply when deciding whether the plaintiff or prosecution adequately proved their case. The trial ends when the jury reaches a verdict, or when they fail to do so and the judge declares a mistrial.