Law is a set of rules that is geared to control human behavior and keep societal order. It is derived from judicial and societal views of morality, justice, reasons, honesty and fairness. Laws are enacted by a sovereign (government), a corporation or a group of people. They are often enforced by a police force and/or a court of justice. The term law also refers to a profession that deals with the study of systems of laws and how they work. Lawyers and judges are examples of such professionals.

There are many fields of law, but most legal systems share some core subjects. These include criminal law, civil and common law, constitutional law, contract law, torts, property law and trust law. Each country defines and classifies these subjects in its own way. For example, in some countries, contract law may be categorized as private or public law while in others it is simply a part of civil law.

A nation’s law can be used to preserve the status quo, protect minority rights, promote social change and ensure that a government is accountable. However, the ability of a legal system to accomplish these tasks depends on the political landscape, which is different from nation to nation. For example, a country with an authoritarian government may keep the peace and maintain the status quo but it may also oppress minorities or suppress revolution.

In addition, the law may be a tool to protect the environment and prevent crime. For example, some nations have laws that require companies to recycle or impose a ban on the manufacture of certain toxic substances. These laws may have a direct impact on the health of citizens and the quality of life in these communities.

The rule of law requires a stable legal system that protects against anarchy or Hobbesian war of all against all, while also providing sufficient confidence for people to plan their affairs. It requires laws that are clear, publicly promulgated and equally enforced, which respect international human rights standards and norms. It also requires transparency in the management of public resources and the ability for citizens to request information from their governments without fear of retaliation.

Modern laws typically define a distinct professional identity for lawyers through regulated training and qualification. Those who practice law must pass a bar exam or obtain a degree from an accredited law school that is recognized by a governing body. These qualifications typically include a Bachelor of Laws, a Bachelor of Civil Law or a Juris Doctor degree. Some legal practitioners are also members of professional associations or bars, which impose additional requirements and disciplinary procedures. These societies can help to maintain professionalism in the legal field and to guard against unauthorized or dishonest practices.

Categories