The law is a legal norm issued by a competent public authority, In general, it is a function that falls on the legislators of the national congresses of the countries, after debate of the scope and the text that promotes it and that must observe mandatory compliance by all citizens, without exception, of a Nation, because on the observation of these it will depend that a country does not end up converted into anarchy or chaos.
As I was just saying, given that the purpose of the laws is to contribute to the achievement of the common good of the people who are part of an organized society under certain duties and rights, non-compliance, of course, will entail a sanction that can, according to the importance of the rule that has been violated, imply a punishment of compliance in prison or the performance of some community-type work that does not entail deprivation of liberty per se, but that must be strictly complied with, likewise, in order to settle the committed offense.
Laws They were born with the objective of limiting the free will of human beings who live inserted in a society and it is the main control that a state has to ensure that the behavior of its inhabitants does not deviate, or end up harming their neighbor.
Laws are the main source of law and are distinguished by the following characteristics: generality, what I said before, that they must be fulfilled by EVERYONE, without exception; mandatory, assuming an imperative-attributive character, which means that on the one hand it grants legal duties and on the other rights; permanence, this means that when they are promulgated they do not have an expiration date, on the contrary, their duration will be indefinite in time until a competent body determines their repeal for some valid and previously agreed cause; abstract and impersonal, which implies that a law is not conceived to solve a particular case, but is moved by the generality of the cases that it can cover and finally, that it is reputedly known, for which no one can argue that he did not comply with it due to ignorance.
Also, a prominent feature of laws in modern states it is the absence of retroactivity; This means that their validity occurs from the date of promulgation and they are not applicable to events that occurred prior to the sanction. This resource prevents the arbitrary application of rules for punitive purposes, as can occur in totalitarian states.
It is emphasized that the laws actually require the participation of the three powers in the republican states: it is the parliaments (legislative power) that make a law, the heads of state (executive power: president, prime minister) that enact or veto this norm and the judges (judicial power) those who monitor its compliance.
In contrast, those rules that arise from the agreement between different nations do not bear the name of law, but rather it is preferred to call them treaties or conventions. Despite being considered as supranational legal entities, in modern democracies all these agreements between countries require approval by local parliaments to acquire force of law. In some cases, these types of pacts are submitted to a plebiscite to obtain the direct opinion of the inhabitants of the country.
As an interesting comment, the concept of law it applies in other realms of human knowledge, as described for the laws of physics or chemistry that govern the elements, or the fundamental principles of arithmetic or algebra. These "regulations" are universal and, while they are unchangeable, they can be applied for the benefit of human progress. Many of these laws bear the eponymous of their discoverer or systematizer and are known by that nomenclature throughout the world.