The law is a set of rules created and enforced by social or governmental institutions to regulate behavior and ensure the welfare of individuals and the society as a whole. It can be conceived as both a science and an art, but its precise definition remains a matter of ongoing debate. The laws that govern human interactions may be written by a collective legislature, resulting in statutes and regulations, or they can be imposed by a government through decrees and regulation or established by judges through precedent (in common law jurisdictions). Private individuals can also create legally binding contracts.

Despite its complexity, the law is a fundamental pillar of society. It ensures a peaceful and orderly environment in which citizens can live and do business with each other, allowing them to concentrate on their work or leisure. It helps keep the peace by resolving disputes between individual citizens. It protects people’s personal liberty and their property by providing them with recourse to the courts for redress when they are violated. It ensures that public services, such as electricity and water, are provided by regulated companies.

It promotes cooperation between humans by providing incentives and disincentives to get things done. For example, tort law provides compensation to victims when their property or bodies are damaged. It also encourages cooperation by preventing harm to others, such as by preventing pollution or defamation of character. Disputes between private individuals are a primary function of civil law, while crimes against the state or community are dealt with by criminal law.

There are a wide variety of fields within the law, ranging from constitutional law and criminal procedure to labour law, property law and commercial law. Several of these fields overlap and intertwine with one another, but they can be broadly classified into three categories:

Contract law concerns agreements to exchange goods or services for value. It encompasses everything from buying a bus ticket to trading options on the stock market. Property law defines people’s rights and duties toward tangible property, such as houses or cars, and movable assets, such as jewellery or stocks. It is further divided into real property or land law, which applies to buildings and their fixtures, and personal property or movable asset law, which covers all other possessions.

Finally, administrative law and regulatory law deal with how a government or organisation manages its affairs and controls the use of its resources, such as water, energy or the internet. This type of law often involves complex economic and sociological considerations. For example, the regulation of the electricity industry in developing countries is usually a joint project between governments and the power utilities. In other cases, the power utility is an independent operator that must comply with the law to compete in the market and provide a competitive service. In either case, these regulators must balance the interests of their customers with those of the power industry itself. These issues are often the subject of controversy and public policy debates.