Law is a set of rules that forms a framework to ensure a peaceful society. If the rules are broken, sanctions can be imposed. The definition of law varies, and there are many books and debates on the topic. The most common definition of law is that it is a social control mechanism.
The laws of a country protect people from oppressive government actions, assure that private parties receive fair treatment in contract disputes, and help resolve conflicts over property ownership or rights to intellectual property. Most legal systems are based on the rule of law, which is defined as a stable system of laws, institutions, norms, and community commitment that delivers four universal principles: accountability, just law, open government, and accessible and impartial justice.
In a democracy, the people create and enforce the law through elections for representatives to parliament or a legislature, and then through legislation that sets out the laws governing their nation. Typically, the law is interpreted and applied by a judicial branch of the government or independent courts, which operate on the principle that decisions by higher courts (known as stare decisis) bind lower courts in similar cases.
Individuals also use the law to make decisions about their personal lives, such as deciding how much to pay for a service or whether they can use a particular piece of property. These areas of law are governed by contract law, tort law, and property law.