| It doesn't stop|
at the water's edge
The theory was largely developed during the Enlightenment and parts of it formed the basis for many of the advances in political freedoms during that time (not the other way around). As a theory which attributes natural rights to natural law rather than a deity, the social contract is a popular example of secular morality.
The first known exposition of social contract theory was made by Plato in his short dialogue Crito. In the dialogue, Socrates is jailed and about to be executed, but when offered a chance to be sprung from jail, refuses it by saying, essentially, "I made my bed and now I have to lie in it."
The dialogue contains this description of social contract theory, in which Socrates assumes the voice of "the Laws":
“”We further proclaim and give the right to every Athenian, that if he does not like us when he has come of age and has seen the ways of the city, and made our acquaintance, he may go where he pleases and take his goods with him; and none of us laws will forbid him or interfere with him. Any of you who does not like us and the city, and who wants to go to a colony or to any other city, may go where he likes, and take his goods with him. But he who has experience of the manner in which we order justice and administer the State, and still remains, has entered into an implied contract that he will do as we command him.
Epicurus argued for a form of contractarian justice, contemporary with Plato. He stated that justice is "an agreement of mutual benefit" and a "compact neither to harm or be harmed." Epicurus' account guided him to many modern positions in ethics, including considering women and slaves as equals to free men in his philosophical commune called "The Garden."
 Developments during the Enlightenment
It started out with a concept of "natural rights," or rights to do things that can be done. There is, for example, a natural right to think or eat, but there is no natural right not to suffer a nasty fall when one jumps off a cliff. A primitive person, living in a "state of nature," has all their natural rights.
Of course, when humans start living together in society, there will be conflicts when different people start exercising their natural rights. This means that to live in a society, a person must surrender a small amount of his/her natural rights by means of the implicit social contract.
Further refinements supplemented this notion of an individual surrender of rights with a collective one (e.g. governments ruling by the "consent of the governed" — thus addressing early objections by David Hume). These concepts eventually worked their way into the U.S.' Declaration of Independence and France's Declaration of the Rights of Man in the late 1700s.
 Applications in secular ethics
Secular humanist organizations, such as the Council for Secular Humanism, applaud the social contract's history of breaking the power of regimes based on divine right, and see in its principles a way to promote morality in society without involving the supernatural.
“”Let all souls be subject unto the higher powers. For there is no power but of God: the powers that be are ordained of God.
A common religious criticism of the social contract runs something like this: "You have no natural rights. God owns you, so you have to do what he says. Which, incidentally, is the same thing as what I say. OBEY OR BURN!"
Strangely enough, many of the people making this argument also pretend to accept the principles of the Declaration of Independence, probably because they like the idea that they have the right to kick out a government that is stopping them from bringing in a theocracy.
This also pointedly ignores a common thread of NOMA regarding interactions with secular society by the religious:
“”Render therefore unto Caesar the things which are Caesar's; and unto God the things that are God's.
“”"A sale," said Rearden slowly, "requires the seller's consent."
|—Ayn Rand, Atlas Shrugged Profusely|
One secular criticism against the idea of the social contract, made by American individualist anarchist Lysander Spooner, is that it is not really a contract at all, that it is unilaterally imposed on the people who must "give up" their rights. It's (supposedly) a click-wrap EULA you don't get to read first.
According to this argument, since people do not choose where they are born, their presence in a country cannot possibly imply their acceptance of the social contract: claiming that a person has "freely chosen" to accept the social contract is like chopping someone's legs off and then saying they are "freely choosing" not to walk. After all, babies born in America cannot simply refuse to become American and join, say, Chinese society just because they want to, right?
Whereas Plato had said, in the passage quoted above, that Athenians who did not wish to abide by the city's laws and customs were free to leave, this is not true of modern societies. Individuals can only emigrate with a valid visa, and will still be entering another society, with similar democratic laws in many cases. Arguably, asylum seekers can be said to have rejected the social contract of their homeland and be seeking a social contract in a less oppressive society. It does not hold that another society will let them settle. In addition, those who reject the social contract altogether have nowhere to go, since virtually the entire planet is bound by laws and government. This is commonly despised by anarchists.
Similar arguments are made by Objectivists and libertarians, who argue that one can only sign away one's natural rights to private parties, not the government, because the government is, in their words, upheld by initiation of force, or in this case also fraud.
Their alternative for this... borders on the utopian. The irony that the negotiation between private émigrés and an interlocking oligopoly of prospective societies precisely mirrors a private market (jobs) which these same libertarians oppose any intervention in or reform to is, of course, not appreciated.
Another argument is that there are certain human rights that cannot be signed away at all; e.g., to refute Phyllis Schlafly's view of marital rape, one might say that a woman cannot sign away her right not to be raped. This may seem obvious, but it's not to some; in fact, until the 20th century the legal doctrine of coverture said that women, upon being married, gave up all rights. Famously it was put (accurately) "husband and wife are one person and that person is the husband." So in this case the wives not only could not control their income, if they had one (no joint accounts, sorry), but they also could not be legally raped by their husbands, since the husband would be raping himself. Ah, the good old days. Yeah...