Judges apply the law to cases to determine which party is correct. The law is a set of rules and principles that have been established by a legislative body, such as a parliament, or by a legal precedent, such as a court decision. Judges are responsible for interpreting the law and applying it to the facts of a case to determine which party is correct. In doing so, judges must consider the relevant statutes, regulations, and legal precedents that apply to the case at hand. They must also consider the arguments made by each party and weigh the evidence presented in court. Ultimately, the judge's role is to ensure that the outcome of the case is consistent with the law and with the principles of justice and fairness.