Law is a set of rules created by social or governmental institutions to regulate behavior and ensure order. Its precise definition is a matter of longstanding debate and various theories exist. Some define law as an aggregate of rules imposed by a sovereign on citizens through the threat of sanctions; others view it as a moral code that is innately binding on everyone and cannot be changed or manipulated by governments. Many different legal systems exist, with their characteristics influenced by the history and culture of a particular region.
Generally, law is a framework that ensures the safety of society and allows people to live in relative peace and security. It may be enforced through mechanisms such as the courts, where judges hear cases brought by individuals who believe they have been wronged. Civil laws deal with disputes between people, while criminal law deals with offences committed against the state itself. Regulations may be made by legislature, resulting in statutes; or by the executive, through decrees and regulations; or by judges through precedent, in common law jurisdictions. Private individuals may also create legally binding contracts.
In the modern world, laws are usually created through legislative processes. Legislative processes involve a group of people, such as members of parliament, deciding the terms and conditions that should be incorporated into legislation. These may be based on research, consultation or public opinion. They are then passed on to the executive branch for enactment into law, or they may be approved by referendum. Government agencies may also create regulations to ensure fairness in business and other affairs.
Many legal systems exist, and their differences reflect the region from which they originate and their relationships with other countries. Traditionally, a country can be classified as either a civil law or a common law system, though the distinction has become less important due to the number of legal transplants from other countries that have occurred over the centuries.
The origin of law varies widely, with some countries relying on scriptures and religious doctrine for their legal principles. In other places, legal systems have been shaped by cultural and social factors, such as the need to preserve traditional forms of agriculture in a changing climate. In still other places, political and economic pressures have shaped laws, such as the need to encourage foreign investment in developing countries. Laws can also be influenced by the international community, as evidenced by treaties like the Geneva Convention on the conduct of war and the Roerich Pact.