In order to solve a conflict between two groups, something need to be used as the 'mediator' between the two. This mediator needs to be impartial and had a set of pre-determined rules that can be used as a standard of 'right' or 'wrong'.
Almost every society that exist in the world right now established a judicial system in order to act as this mediator.
Both parties that are involved in a conflict are allowed to present their case to the judge. After hearing each of the presentation, the judge will checked how each of their position stand according to the law and determine who are in the 'right' and who are in the 'wrong'/