Law is a system of rules that a community enforces to ensure that individuals and groups adhere to the will of the state. It can be imposed by a collective legislature, resulting in statutes, by the executive, resulting in decrees and regulations, or established through judge-made precedent in common law jurisdictions. The law can also be created and enforced by private individuals through legally binding contracts. Law shapes politics, economics, history and society in many ways and serves as a mediator of relations between people.
In general, the law makes sure that everyone receives fair treatment and that their rights are protected. The goals of the legal system include ensuring that the police and government officials carry out their duties properly, protecting the rights of people who are harmed by others (such as when someone causes an accident or defames their character), and providing a mechanism to settle conflicts that arise between different groups in a society.
The law is a wide field, and the practice of law is a career path that attracts young people in increasing numbers. It includes advising clients on what they need to do to comply with the law, representing them in court and making decisions. In addition, the law provides a rich source of scholarly inquiry into legal history, philosophy, political science and economic analysis. It is important for a society to have clear laws that are accessible and easy to understand, and enforceable by the courts.