Law is a set of rules that are created and enforced through social or governmental institutions to regulate behavior. Its precise definition is a matter of some debate and it has been described as both a science and an art. Law is distinct from other fields such as natural or social sciences in that it is normative rather than descriptive or causal (as with the law of gravity).
There are a wide variety of laws, covering everything from property to the rights of immigrants to the rules that judges follow when judging cases. There are also many different ways that laws can be established: they may be voted on by legislatures and codified as statutes or regulations, or they may be the result of court decisions which are then binding upon subsequent courts under a doctrine called stare decisis. Some laws are based on natural principles, such as the law of contracts and the law of torts. Others are based on religious principles, such as the laws of karma and dharma, or the mystical concepts of divine law.
The precise way in which laws are enforced varies between countries. For example, in the United States judicial decisions are recognised as laws, alongside statutes passed through parliament and regulations issued by the executive branch. This is known as the common law system. In contrast, in many other countries such as Japan, they have a civil law system in which the authoritative sources are written codes of law that explicitly provide the rules that judges must follow to come to their decisions.