From a formal dinner to a game of monopoly, wherever humans congregate, we create rules to help us interact with morality and efficiency. The primary difference between these social rules and laws is that the latter have been deemed important enough that a governing body enforces them via policing and a court system. While such laws usually find their roots in religious texts, there is a current motion toward a secular system in many countries. Often, as in the United States and China, a country has drawn up a document clearly articulating their base constitutions, but there are cases, such as that of the United Kingdom where legal matters are processed in accordance with an uncodified constitution.
Depiction of King Ur-Nammu, whose law code is the oldest existing in the world.
However drafted, laws largely serve the same basic functions across the world: to keep a community safe. Be it safe from robbery, assault, identity theft, a vehicle collision caused by someone driving on the wrong side of the road, or even safe in financial or environmental terms by ensuring inheritance occurs as intended and waste is not dumped in fresh water sources, the laws of a land act as a deterrent and punishment to encourage self-control and accountability in a population. Law is generally split into criminal and civil categories. The former are cases brought forward against an individual by the state which seek to punish felonies and misdemeanors with incarceration, fines, etc while civil law deals with disputes between individuals or corporations in which a person found guilty must compensate the plaintiff, usually by monetary means. However, there are many subcategories of law, as can be seen below, and lawyers from any field can be very well compensated and also very highly respected - for example, 25 out of the 44 US presidents as of 2013 were lawyers at one point¹.
 Wall Street Journal Law Blog - Barack Obama: The U.S.’s 44th President (and 25th Lawyer-President!)