Law is the body of rules that govern society and a country. It serves a variety of purposes, including:
Establishing standards; keeping peace; maintaining the status quo; protecting individual rights; resolving disputes; and providing for orderly social change. Some legal systems serve these functions better than others.
Civil law (also called public law) is the set of laws that govern the people, their property, and their relationships within a nation or state. Unlike common law, it is arranged in codes that are easy for citizens to understand and judges to apply.
A code is a small book that explains and regulates a particular topic. In civil law, the code is usually made up of a set of statutory laws.
Criminal law focuses on offenses against the law, and provides for the government to punish an offender. It may also be used to prevent individuals from harming others.
Commercial law encompasses complex contract and property law, covering areas such as agency, insurance law, bills of exchange, sales, insolvency, and bankruptcy. It has roots in the medieval Lex Mercatoria, which emphasised freedom to contract and alienability of property.
Religious law is often based on religious precepts, and may include Christian canon law or Jewish Halakha and Islamic Sharia. In addition, it often includes human elaboration of the underlying principles.
In modern countries, the law is regulated by governments and independent regulating bodies, such as bar associations or law societies. Lawyers are members of these governing bodies, and typically gain professional identity through specific legal procedures.