Law is the system of rules enforced by a society or government to regulate behaviour. It may be created by a legislature, resulting in statutes and regulations, or it may be decided by courts, using precedent under the doctrine of stare decisis. It may govern a specific region, such as a country or city, or it might span several nations. Law also refers to the profession of advising people about the law and representing them in court.
Various theorists have defined law in different ways, but most agree that it is an instrument for securing justice and ensuring social order. The precise nature of laws is not always clear, and it is common for a given legal system to have different branches that cover particular aspects of daily life. For example, contract law covers agreements between private individuals (such as contracts for the sale of goods), tort law concerns damages for injury or loss of property (such as car accidents or defamation), and criminal law punishes activities that are deemed to be against the public interest, such as murder.
Other branches of law include immigration and nationality law, which determines how citizens become or lose their citizenship, and tax law, which sets out rules about calculating and paying taxes. There is even a branch of law that deals with space law, which involves the rules of outer space that humans must follow in order to avoid damaging the Earth’s atmosphere or natural resources.