Law is a system of rules that people or a society establish to govern behavior. Laws can be made by a collective legislature through statutes, by an executive through decrees and regulations, or established through precedent in a court of law, as is the case in common-law jurisdictions. Laws can also be created by private individuals through contracts or other legal instruments. The purposes of law are four-fold: establishing standards, maintaining order, resolving disputes and protecting liberties and rights. Different nations have different ways of achieving these goals. In stable countries with democracies, laws can serve to protect minorities against majorities and promote social justice, even as they help to maintain peace and order in a society. In unstable or authoritarian countries, law may fail to fulfill its principal functions, and people often rebel against the authority that makes and enforces them.

Many schools of thought have influenced the definition of law, and debates continue to rage. Some, like Hans Kelsen’s “pure theory of law,” define it as a normative science. Others argue that law is a matter of custom and that the nature of a particular law varies with time and place, rather than remaining constant.

Whether or not the law is normative, most scholars agree that laws must be interpreted to determine their true meaning and application. Two important methods of interpretation are known as originalism and textualism. The former approach requires a judge to find the true intent of the legislator who wrote a statute, and to follow that intent regardless of subsequent changes in social conditions. The latter method requires a judge to rely only on the literal words of the statute, and refuse to consider any other possible meanings that might broaden its scope.

The study of law is not just about identifying and explaining the rules of a given jurisdiction; it can also raise profound questions about human values, justice and power. Law is also a source of scholarly inquiry in such fields as philosophy, political science, economic analysis and sociology.

The most important function of a legal system is to provide a framework for resolving conflicts and keeping society stable. However, a law cannot accomplish this goal unless it is clearly understood and accessible to all citizens. A law must also be capable of responding to changes in society, and this can be accomplished through interpretation and creative jurisprudence. Finally, a legal system must ensure that all people are treated equally and without prejudice. This is difficult to accomplish if the law is based on a hierarchy of social classes or privileges. Moreover, the legal system must also be capable of preventing abuses by those in positions of power. A nation must have clear expressions of rights and duties, mechanisms for regulating the exercise of authority, and ways to resolve grievances by individuals against governments or corporations. The best way to achieve this is through a constitutional republic.