Law is a set of rules created by a particular country or community that form a framework to ensure a peaceful society and can be enforced, with sanctions imposed if they are broken. The study of Law encompasses the laws, legal system and all professions that deal with advising on, representing or enforcing them.
Law shapes politics, economics and history and serves as a mediator of relations between people. Its principal functions are to keep the peace, preserve the status quo, protect individuals against majorities and minorities and encourage social change. A government that fails to serve these purposes may be replaced by one that does (although revolutions are difficult and contentious).
Legal concepts include a definition of what constitutes a crime, a statement of the rights that every person has, the principles of justice that govern legal processes such as trial procedures and evidence. Law can be made by a collective legislature or by a single legislator, resulting in statutes, or established by judges through precedent in common law jurisdictions. There are also international laws governing such issues as laches, good faith and res judicata.
There are many different books and debates about what Law really is and what it should comprise. There is, however, a certain degree of consensus about its role. It cannot mandate behaviours that are impossible or force people to do things that are beyond their abilities, because the shape of the physical world prevents that.