The Social Contract Theory has been a very influential in the development of many modern political philosophies. John Locke and Jean-Jacques Rousseau, who each argued for a slightly different version of the Social Contract Theory, largely popularized the idea. However, Socrates first introduced the idea in Plato's dialogue the Crito, sections 50a-54d. The Social Contract Theory basically states that every citizen of a state is said to implicitly agree to a "contract", whereby he gives up some of his freedom and other things in order to secure the protection and benefits the state has to offer him. By this rational the methods and laws of the state are justified by every person's implicit agreement to them. This does not mean that every law the state makes must be upheld, there is still allowed room for just and unjust law, as everyone recognizes that the state sometimes oversteps its bounds. However, it is the responsibility of the citizen to point out this injustice to the state, and persuade the state of their error.
Socrates makes his presentation of the Social Contract in what is sometimes called "The Speech of the Laws" in the Crito, sections 50a-54d. Crito has come to persuade Socrates, who is in jail awaiting execution, to escape the city and save his life. Crito gives many arguments to persuade Socrates, but each of Crito's arguments is met with counterarguments by Socrates to accept his fate. The last, and most philosophically profound, is the "Speech of the Laws". Socrates explains to Crito that laws have nurtured and protected him, thus Socrates owes a debt to the Laws as a person would owe their parents (Crito, 50d). Socrates also says that he must obey the laws because he has agreed to do so. He has agreed by staying in Athens and accepting what the city has to offer, when he was never forced or restrained. Socrates has thus implicitly agreed to uphold the laws of the city by remaining in their care (Crito, 51e).