Law is a set of rules which is needed for a society to maintain order. It governs certain types of conduct between individuals, businesses and the government. In complex societies the law is codified in a written form, so there is no confusion about what it is.
Generally, institutions will be empowered to amend law or create new laws. These institutions are the legislative authorities. In some countries these institutions are called parliaments. In other countries they are known by other names.
In addition, groups and institutions are established to define, apply and enforce the law. These groups are separate from the parliaments and are separate from each other to reduce any potential conflict of interests. The police, legal practitioners, prosecuting authorities and the courts are all parts of the legal system in common law countries.
Law may be established by the majority of the people (as is generally the case where a parliament exists) or imposed directly by a ruler.