Law is a system of rules that is created and enforced through social or governmental institutions to regulate behavior. It may be written and codified, resulting in statutes or regulations, or it may exist as unwritten common law. It may be created by a legislative body, such as a parliament, a council of ministers, or an executive branch of government, such as the presidency or cabinet, or it may be established through judicial precedent, resulting in case law. Laws can govern a wide range of activities, including criminal, civil and commercial. Laws may also be applied in a variety of ways, such as through a constitutional framework, administrative procedures, or the courts.
Law has many functions, such as keeping the peace and maintaining order in society, preserving individual rights and protecting minorities against majorities, ensuring property, contract, and procedural rights, promoting social justice, and providing for ordered and structured social change. Different legal systems serve these purposes differently. For example, an authoritarian government may keep the peace and maintain the status quo but oppress minorities or political opponents. A democratic government, on the other hand, may serve these purposes more effectively by providing citizens with a voice in the political process and ensuring that all citizens are treated fairly under the law.
The precise nature of law is an ongoing topic of debate. Its distinguishing features include its normative nature and its interdependence with human psychology and philosophy. The law is a set of rules that defines how humans should behave and what they may require from each other, and its precise meaning has therefore been viewed as a form of morality. In addition, the law is a human construct; it cannot be empirically verified, as can, for example, the laws of science such as the law of gravity.
Several categories of law are distinguished, with the most important being criminal law and civil law. Criminal law is concerned with the prosecution of crimes, such as murder and robbery. Civil law, sometimes known as common law, covers a range of agreements and relationships, such as contracts, marriage, property ownership, inheritance, and employment. Civil law has its roots in Roman law and was adapted by medieval legal scholars, with the concepts and categories often supplemented or modified by local custom and culture.
Other categories of law are labour law, which deals with the tripartite relationship between employer, employee and trade union, and includes collective bargaining regulations as well as rights for individuals; family law; and administrative law, which involves the procedures by which cases are tried and appealed, such as the rules governing evidence, court proceedings and trial procedure. The law is a vast subject that reaches into every area of life, but three broad topics are presented here for convenience, though the subjects frequently overlap and intersect.