Law is a system of rules created and enforced by social or governmental institutions to regulate behavior. It may be enacted by collective legislature, resulting in statutes, or by the executive, resulting in decrees and regulations, or it may be established by judges through precedent, normally in common law jurisdictions. Law can be based on religious precepts, such as Jewish Halakha and Islamic Sharia, or it can be derived through human elaboration using the techniques of interpretation (Qiyas), ijma, and precedent.
Even in well-ordered societies, people sometimes disagree with each other and conflicts occur. The law provides a means to resolve these conflicts peacefully. For example, if two people claim the same piece of property, the law decides who has the right to it. Laws can also help ensure a safe society by setting standards and preventing dangerous behaviour.
Law also covers the rights of individuals to property, privacy and freedom. For example, the law allows a person to sue for compensation in the event of being injured by the negligence of another. However, it is important to note that not all legal cases are fought in the courts and some disputes are settled by private agreements between parties.
The most widely used system of law in the world is civil law. This includes the Roman-German legal tradition, which can be found on all continents and covers about 60% of the world. It uses concepts, categories and rules inherited from Roman law and canon law, supplemented by local culture or custom. The principle of civil law is that all people are equal before the law and have the right to a fair trial.