Law is the system of rules created and enforced by a community to govern the activities of its members, often with sanctions for violations. Law can be a complex matter of social engineering, and can have significant effects on society and human relations. It can also be an expression of a community’s ideals and beliefs, expressing values such as justice, equality, and fairness. Law can be written by a legislature, producing statutes; by executive decree, resulting in regulations; or by judges’ decisions forming precedent (under common law).
Laws may be enforced by a police force and the military, but they are mostly enforced by civil courts, which are the principal institution in a legal system. Other institutions that make up a legal system include the constitutional and administrative law that establishes the relationships among the executive, legislative and judicial branches of government, as well as the fundamental rights of citizens.
The law’s political basis is determined by the political structure of a country, or nation-state, and can be influenced by a constitution or bill of rights, as well as by revolutions in which people seek to replace existing political-legal authority with something new. A nation’s legal system may also be shaped by its history of conflict with other nations or regions. For example, a law of war is an important factor in defining a country’s borders. Law can also be governed by religious precepts, such as the Jewish Halakha and Islamic Shariah.