Why Criminal Justice
The oldest known codified law is the Code of Ur-Nammu, written in the Sumerian language circa 2100 BC-2050 BC. The preface directly credits the laws to king Ur-Nammu of Ur. In different parts of the world, law could be established by philosophers or religion. In the modern world, laws are typically created and enforced by governments. These codified laws may coexist with or contradict other forms of social control, such as religious proscriptions, professional rules and ethics, or the cultural mores and customs of a society.
Within the realm of codified law, there are generally two forms of law that the courts are concerned with. Civil laws are rules and regulations which govern transactions and grievances between individual citizens. Criminal law is concerned with actions which are dangerous or harmful to society as a whole, in which prosecution is pursued not by an individual but rather by the state. The purpose of criminal law is to provide the specific definition of what constitutes a crime and to prescribe punishments for committing such a crime. No criminal law can be valid unless it includes both of these factors. The subject of criminal justice is, of course, primarily concerned with the enforcement of criminal law.
 Criminal justice system
The criminal justice system consists of three main parts: (1) Legislative (create laws); (2) adjudication (courts); and (3) corrections (jails, prisons, probation and parole). In the criminal justice system, these distinct agencies operate together both under the rule of law and as the principal means of maintaining the rule of law within society.
Main article: Police
The first contact an offender has with the criminal justice system is usually with the police (or law enforcement) who investigate the suspected wrongdoing and make an arrest, but if the suspect is dangerous to the whole nation, a national level law enforcement agency is called in . When warranted, law enforcement agencies or police officers are empowered to use force and other forms of legal coercion and means to effect public and social order. The term is most commonly associated with police departments of a state that are authorized to exercise the police power of that state within a defined legal or territorial area of responsibility. The word comes from the Latin politia ("civil administration"), which itself derives from the Ancient Greek πόλις, for polis ("city"). The first police force comparable to the present-day police was established in 1667 under King Louis XIV in France, although modern police usually trace their origins to the 1800 establishment of the Marine Police in London, the Glasgow Police, and the Napoleonic police of Paris.
Police are primarily concerned with keeping the peace and enforcing criminal law based on their particular mission and jurisdiction. Formed in 1908 the Federal Bureau of Investigation began as an entity which could investigate and enforce specific federal laws as an investigative and "law enforcement agency" in the United States; this, however, has constituted only a small portion of overall policing activity. Policing has included an array of activities in different contexts, but the predominant ones are concerned with order maintenance and the provision of services.
Main article: Courts of Law
The courts serve as the venue where disputes are then settled and justice is administered. With regard to criminal justice, there are a number of critical people in any court setting. These critical people are referred to as the courtroom work group and include both professional and non professional individuals. These include the judge, prosecutor, and the defense attorney. The judge, or magistrate, is a person, elected or appointed, who is knowledgeable in the law, and whose function is to objectively administer the legal proceedings and offer a final decision to dispose of a case.
In the U.S. and in a growing number of nations, guilt or innocence (although in the U.S. a jury can never find a defendant "innocent" but rather "not guilty") is decided through the adversarial system. In this system, two parties will both offer their version of events and argue their case before the court (sometimes before a judge or panel of judges, sometimes before a jury). The case should be decided in favor of the party who offers the most sound and compelling arguments based on the law as applied to the facts of the case.
The prosecutor, or district attorney, is a lawyer who brings charges against a person, persons or corporate entity. It is the prosecutor's duty to explain to the court what crime was committed and to detail what evidence has been found which incriminates the accused. The prosecutor should not be confused with a plaintiff or plaintiff's counsel. Although both serve the function of bringing a complaint before the court, the prosecutor is a servant of the state who makes accusations on behalf of the state in criminal proceedings, while the plaintiff is the complaining party in civil proceedings.
A defense attorney counsels the accused on the legal process, likely outcomes for the accused and suggests strategies. The accused, not the lawyer, has the right to make final decisions regarding a number of fundamental points, including whether to testify, and to accept a plea offer or demand a jury trial in appropriate cases. It is the defense attorney's duty to represent the interests of the client, raise procedural and evidentiary issues, and hold the prosecution to its burden of proving guilt beyond a reasonable doubt. Defense counsel may challenge evidence presented by the prosecution or present exculpatory evidence and argue on behalf of their client. At trial, the defense attorney may attempt to offer a rebuttal to the prosecutor's accusations.
In the U.S., an accused person is entitled to a government-paid defense attorney if he or she is in jeopardy of losing his or her life and/or liberty. Those who cannot afford a private attorney may be provided one by the state. Historically, however, the right to a defense attorney has not always been universal. For example, in Tudor England criminals accused of treason were not permitted to offer arguments in their defense. In many jurisdictions, there is no right to an appointed attorney, if the accused is not in jeopardy of losing his or her liberty.
The final determination of guilt or innocence is typically made by a third party, who is supposed to be disinterested. This function may be performed by a judge, a panel of judges, or a jury panel composed of unbiased citizens. This process varies depending on the laws of the specific jurisdiction. In some places the panel (be it judges or a jury) is required to issue a unanimous decision, while in others only a majority vote is required. In America, this process depends on the state, level of court, and even agreements between the prosecuting and defending parties. Some nations do not use juries at all, or rely on theological or military authorities to issue verdicts.
Some cases can be disposed of without the need for a trial. In fact, the vast majority are. If the accused confesses his or her guilt, a shorter process may be employed and a judgment may be rendered more quickly. Some nations, such as America, allow plea bargaining in which the accused pleads guilty, nolo contendere or not guilty, and may accept a diversion program or reduced punishment, where the prosecution's case is weak or in exchange for the cooperation of the accused against other people. This reduced sentence is sometimes a reward for sparing the state the expense of a formal trial. Many nations do not permit the use of plea bargaining, believing that it coerces innocent people to plead guilty in an attempt to avoid a harsh punishment.
The entire trial process, whatever the country, is fraught with problems and subject to criticism. Bias and discrimination form an ever-present threat to an objective decision. Any prejudice on the part of the lawyers, the judge, or jury members threatens to destroy the court's credibility. Some people argue that the often Byzantine rules governing courtroom conduct and processes restrict a layman's ability to participate, essentially reducing the legal process to a battle between the lawyers. In this case, the criticism is that the decision is based less on sound justice and more on the lawyer's eloquence and charisma. This is a particular problem when the lawyer performs in a substandard manner. The jury process is another area of frequent criticism, as there are few mechanisms to guard against poor judgment or incompetence on the part of the layman jurors. Judges themselves are very subject to bias subject to things as ordinary as the length of time since their last break.
Manipulations of the court system by defense and prosecution attorneys, law enforcement as well as the defendants have occurred and there have been cases where justice was denied. 
The Huntsville Unit of the Texas Department of Criminal Justice in Huntsville, Texas is a prison, a component of a corrections system
Main article: Corrections
Offenders are then turned over to the correctional authorities, from the court system after the accused has been found guilty. Like all other aspects of criminal justice, the administration of punishment has taken many different forms throughout history. Early on, when civilizations lacked the resources necessary to construct and maintain prisons, exile and execution were the primary forms of punishment. Historically shame punishments and exile have also been used as forms of censure.
The most publicly visible form of punishment in the modern era is the prison. Prisons may serve as detention