Law is the set of rules that are created and enforced by social or governmental institutions to regulate behavior. Laws can be enacted to govern a variety of matters, such as contracts, crimes, property ownership, and war. Laws can also be used to control society and to ensure the fairness of its institutions. For example, law can prohibit certain types of censorship and other forms of social restrictions. Law is often viewed as an area of both empirical and social science, although it can be hard to categorize.
Legal systems vary significantly. Laws are derived from a combination of factors including natural or divine inspiration, tradition, and custom. Some systems of law, such as ancient Roman and Islamic law, underwent major codification. Others, such as English common law, developed through court decisions and case law.
The law can be divided into civil and criminal laws. The former covers disputes between individuals, such as a car accident or defamation of character. The latter addresses crimes against a person or group, such as murder or treason. Some fields of law are specific to a region, such as tort law or immigration law.
Many laws are codified in books such as the United States Code, which compiles most public laws and includes amendments. Other laws are enacted in the form of bills that may or may not become law. Laws can also be established by judicial interpretation, which examines the meaning of a law in specific circumstances.