Modern social contract theory is said to begin with Thomas Hobbes' Leviathan (not Rousseau). I will give an overview of the main points in all social contract theories, including the one in Plato's Crito (although technically, it is not a social contract theory!). Note that this is a broad and very brief overview. For a more nuanced view, I recommend the SEP or IEP.
Form of modern social contract theories
State of nature and its problems (=reasons to have the social contract)
They always begin with an hypothetical state of nature. What would happen if there were no laws, no form of government intervening?
Ways to resolve these issues (=the social contract)
After describing the state of nature, it is clear that there should be an intervening body (=government). For this government to work, the citizens should hand over some of their freedoms to this government. Social contract theories include which freedoms and justification for handing these over (i.e. the role of the government).
Plato's Crito and Republic
Socrates says in Crito he cannot evade the laws of the city, because they made his life possible. You can't avoid laws when you want to; you were born in a city with laws that gave you protection and possibilities. You also have to accept them when they 'turn against you'. Citizens here, however, can leave the city when they grow up. If you stay however, you must accept the conditions (laws) of that city. So Socrates accepts his death sentence.
In the Republic, he outlines his 'state of nature' (though he doesn't call it as such). People would do all sorts of unjust things if they can get away with it (Ring of Gyges). They also want to avoid being treated unjustly and not be able to treat them unjustly back. A just society is one in which these extremes are avoided. Justice is worth having for its own sake (i.e. needs no external justification). The dialogue goes on to justify this view. It is not a social contract theory, because it does not say you give up something to a governing body for certain reasons; you just live a good life because it's worth it by itself.
(As a side note, Hobbes (and other after him) believe all men are made by nature to be equal. This is very different from the notion in Greek Philosophy, where for instance Aristotle said some people are just meant to be slaves and some people are meant to lead.)
During Hobbes' time, religious civil wars were commonplace. It is no surprise then that Hobbes' main goal of the social contract is public safety. Hobbes' state of nature was a place of war of "all against all" (he clearly was influenced by these religious wars). It was the most pessimistic world view of any contract thinker.
To resolve this, he proposes a social contract. The citizens sign the social contract, however, the sovereign is not a party of the contract (the citizens can't abandon the contract because the sovereign breaks the rules (compare with Locke!)). You can never resist him; he is the only thing that stands between this state of affairs and the awful State of Nature! For Hobbes', the sovereign is the most powerful man on Earth (even a God on Earth). The title page of the book says "There is no power on earth which can be compared to him".
My thoughts: this absolutist point of view may seem extreme nowadays, but consider the religious, civil wars he lived in. He wanted peace and was willing to give up a lot to get it, even if that means giving up your freedom to be ruled by a potentially tyrannical sovereign. A lot of people in the same situation nowadays would agree. Think of the people in the Middle East who prefer Saddam Hussein's (horrible) regime to the unrest of having no real leader, for instance.
Locke's Second Treatise on Government
Locke's State of Nature is very different from Hobbes'. The State of Nature is not that bad. Contrary to Hobbes' version, it is not a lawless state (there are indeed morals). There is the Law of Nature (which has been given to us by God). We all belong equally to God, we can't take away what is God's, so we shouldn't harm each other. As long as you don't harm others, you are free to do as you please. It is, in other words, a peaceful place. But, conflicts may arise. A property dispute, for instance, and there is no government to intervene. There is no civil authority, so disputes are likely to escalate (instead of being resolved by a third party). This is the main reason for the social contract.
For Locke, to goal of the government is to serve the citizens (i.e. those who signed the contract). The sovereign has fiduciary power (we entrusted him with this power); if the sovereign doesn't do this, the citizens can rebel (i.e. abandon the contract). The role of the government is to protect"life, liberty and estate, which I call by the general name of property" (property in Locke is much broader than what it means to us today); to protect our rights which are given to us by the Law of Nature.
Rousseau's Social Contract
Rousseau has two social contract theories. The first is a descriptive theory, outlined in his Discourse on the Origins of Inequality. The second is a normative theory, outlined in his Social Contract.
Rousseau's develops his idea of the State of Nature historically. In the beginning, with few people, everyone was happy on their own. They had few needs which were easily satisfied by nature (an abundance of resources for few people). Since people lived solitary lives, there was no competition, no fear, etc. Since pity is an essential trait of these people, they would not harm each other.
But, times change. More people were trying to get by with the same amount of resources, so they had to start living differently. They started living in small communities and divisions of labour were introduced. Living in communities, however, had some nasty side effects: people started comparing themselves with others, which lead to shame, contempt,... It was in this phase that private property came into existence, which led to competition, greed, and inequality.
Those who came out best in the competition think it's a good time to start a government to protect their rights. It is supposedly to guarantee that everyone is equal, but in reality it just makes sure the inequalities that benefit those with private property are kept in place.
His normative social contract theory is attempt to deal with this state of affairs. His book begins with "Man was born free, and he is everywhere in chains"; he clearly wants to offer a solution to resolve this issue. Since the State of Nature is so peaceful, it would be reasonable to expect that he would propose to go back to this state. He does not do this; it would not only be not feasible, but also not desirable, he says. So the question becomes: how can we live together (in a community), but at the same time be free (i.e. avoid the nasty side effects I talked about). This is where he introduces his very controversial concept of the General Will. We submit our own, individual wills to the General Will. This General Will is not just the sum of particular wills; individual persons become a people and this becomes the foundation of society; this is the sovereignty, which, according to Rousseau, is undividable. The General Will is directed towards the common good.
This concept has been very controversial, especially when Rousseau said that people who do not comply must be "forced to be free". This all sounds very totalitarian and even gives justification for it. Robespierre was influenced very much by this book and said to lead his Terror regime "in the name of the people"; it was the "will of the people". Rousseau also said the "General Will cannot dwell"; for some, this is even more evidence of his totalitarian viewpoints, for others, it just follows from the definition of the General Will, namely that it is the norm, what reasonable people ought to want.