Law is a set of rules and regulations that are enforced by government or social institutions to govern human behaviour. Its precise definition is a matter of debate, but it generally encompasses a system of rules that is enforced through coercion, with punishments such as fines or imprisonment for breaking the laws. The term law is also used to refer to a particular field, such as legal study or practice.

Most countries have some form of law to ensure that the actions of their citizens are regulated and that everyone is treated fairly. The laws vary from region to region, but they often include core principles such as equality, property rights, free speech, freedom of religion and fair trial. The laws of a country shape the politics, economics and history of that place, as well as influencing social relations.

There are many different types of laws, including constitutional law (the constitutions of various states and nations), administrative law (laws that govern how government works) and criminal law. There are also laws that deal with individual issues such as employment law, family law or property law. Laws may be created by a group legislature, resulting in statutes; decreed by the executive through regulations and orders; or established by judges through case law, known as precedent in common law jurisdictions. Laws may also be written by individuals in legally binding contracts, or created by a group such as an employer.

Some laws may be based on religious precepts, such as the Jewish Halakha and Islamic Sharia. However, most of the laws in these religious jurisdictions depend on further human elaboration and interpretation through the techniques of Qiyas, Ijma and analogous reasoning to develop and refine the basic principles.

In common law systems, a judge will carefully consider all of the evidence presented in a case before making a ruling. This decision, known as a judgment, will be used as a precedent when judging similar cases in the future. This principle, known as stare decisis, helps to ensure consistency and clarity in the court system.

While some laws are based on objective principles, others seem to reflect a moral stance or a desire to protect certain values. For example, a prohibition on insider trading reflects a concern for fairness and a moral position against cruelty. There are also laws that reflect the societal views of a culture, such as censorship or laws dealing with war and the military. These laws can be influenced by a constitution, whether it is written or tacit, and by the principles encoded within. See censorship; crime and punishment; and due process for more information.