Law is the system of rules and principles that governs a society. It creates a framework and rules to help settle disputes between individuals or groups and it provides the foundation for social order, justice and equality. Laws are created and enforced by government, and laws can be either written or unwritten, and both traditional and modern.
Jurists have expressed many different views about the purpose and function of Law. Most think that the primary function of Law is to ensure justice. They agree that the definition of Law depends on the viewpoint from which it is viewed: It could be seen as an objective fact or a set of rules derived from a rational deliberation. It can be proven or hypothetical, sanctioned or unsanctioned, true or mythical and harmonious or antagonistic. A typical example is the law of gravity: it states that whatever is thrown up, unsuspended in space will fall.
In most nation-states (as countries are called in international law), the people or groups who have military power also command political power and thus make the Law. However, each year there are revolts against existing political-legal authority.
In a lawful society, the fundamental functions of Law are to keep the peace, maintain the status quo, protect individual rights, promote social change and ensure that those in power are accountable. Some legal systems do these better than others. For instance, an authoritarian regime may keep the peace but it can oppress minorities or political opponents.