Law is a system of rules that governs the behaviour of people and communities. It is enforced through mechanisms like punishments and fines. It influences politics, economics and history in many ways and also serves as a mediator between people.
It has a wide variety of branches. Contract law covers agreements to exchange goods or services, from a bus ticket to a mortgage; criminal law deals with crimes; and family law and employment law cover relationships between individuals. Environmental law deals with the protection of the natural world, and public services are governed by law that imposes varying degrees of social responsibility. This is especially important in areas like water and energy.
International laws set the standards that countries must follow in trading and military operations. These are regulated by institutions like the UN and the World Trade Organization. Other international agreements deal with specific areas like the environment and health.
Within a country, laws are created by a legislature, resulting in statutes; or they can be based on decisions of judges, as in common law jurisdictions (e.g. the United States); or they can be influenced by a constitution, whether written or tacit. For more on this subject see constitution; constitutionalism; legal philosophy; and law, theory of.