Law is a system of rules a society sets to maintain order and protect harm to persons and property. Law is ancient, dating back at least to the Code of Hammurabi, written by an ancient Babylonian king around 1760 BC. Today, most countries have tens or hundreds of thousands of pages of law. Laws are enforced by the police, supported by the court and prison systems. Laws are written by legislators, such as senators or congressmen. In America and many other countries, laws must uphold and not contradict the Constitution, a document outlining the most basic rules of the country.
Aside from law being a set of rules, the word also refers to the law as practiced by lawyers, who either prosecute or defend a client from an accusation of violating the law. Becoming a lawyer requires attending law school and passing a bar exam. This entitles the lawyer to a law license. Only lawyers with a law license are allowed to practice law.
There are many categories of law. These include contract law, property law, trust law, tort law, criminal law, constitutional law, administrative law, and international law. Each of these sets the rules for a distinct area of human activity. Without laws, there is lawlessness, which historically has led to a general breakdown in society, sometimes to the point of a near-standstill in the economy. Those that advocate the abolition of all laws are called anarchists.