Law is a huge subject that covers rules that are created and enforced by social or governmental institutions to regulate behaviour, and it shapes politics, economics, history and society in many different ways. Its precise definition is a topic of long-standing debate. Some forms of law are rooted in religious precepts, for example Islamic Sharia, while others require human elaboration, such as Jewish Halakha and Christian canon.

In most countries, laws are made and enforced by governments. Each nation has its own constitutional system of government and its own laws, though the fundamental function is the same: to ensure that everyone is treated fairly and with respect, that their rights are protected, and that they can live a peaceful life without interference from other people.

The laws that govern people differ from country to country, but the main areas of law are employment law, tax law, civil procedure and criminal law. Labour law concerns the tripartite relationship between a worker, employer and trade union, and includes such issues as a right to strike and minimum wage regulations. Tax law is the study of how a society taxes its citizens, and it also involves regulating banks in terms of how much capital they must hold to avoid bankruptcy. Criminal law is the study of how to punish people who break the rules.

People do not always agree about what the rules should be, and a law can help resolve these disagreements. For example, if two people claim ownership of the same piece of land, a court can decide who owns it by looking at the evidence presented in the case. The law can also help in other ways, for example, by ensuring that police officers and public officials carry out their duties without discrimination.

One of the key aspects of law is that it changes and adapts to the needs of society. This is why there are so many areas of law.

There are three broad categories of law, but the subjects within these categories intertwine and overlap. Employment law, for example, deals with the relationship between a worker, an employer and a trade union. Taxation law covers the collection and regulation of taxes, while criminal law considers how to punish a person who breaks the rules.

There are also special types of law, such as family and civil rights law, that deal with specific groups of people. These laws are important because they can help protect people from abuse and injustice. However, laws are not a panacea and they have their limits. People sometimes revolt against established law, and in some cases this can lead to revolutions that establish new forms of political-legal authority. This can take the form of a democratically elected government or of an agreement between people to share power. In the latter case, a constitution is usually established to set out how the law will work. In either case, the law is a vital part of a society.