Although Rousseau discussed the Social Contract, the two most famous proponents of the theory are Thomas Hobbes and John Locke. Each agrees that the purpose was to create a government, they disagree on the motives behind the creation of that entity.
Hobbes in Leviathan proposed that people entered into a contract--that is created a government--in which they surrendered certain rights to preserve them from the dangers of the "war of all against all" in which "life is nasty, brutish and short." The important element in Hobbe's theory is that people SURRENDER certain rights for their own protection and the greater good. The best analogy might be traffic signals; they prevent everyone from entering the intersection at one time and the resulting chaos. Can't say that I disagree with him.
Locke's famous work was his Two Treatises on Civil Government. In the first, he argued against divine right and absolute monarchy. In the second, he said that all people are created with certain "natural rights," including "life, liberty and estate." He argued that people created a government to PROTECT those very rights. He also said that if government did not protect those rights, it could be altered or even abolished by the people. Locke's theory is best illustrated in the following words from the Declaration of Independence, in which Thomas Jefferson relied heavily on Locke:
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable rights, that among these are life, liberty and the pursuit of happiness. That to secure these rights, governments are instituted among men, deriving their just powers from the consent of the governed. That whenever any form of government becomes destructive to these ends, it is the right of the people to alter or to abolish it, and to institute new government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their safety and happiness
The social contract is an idea put forth by philosophers like John Locke and Jean-Jacques Rousseau to explain how political entities come to exist and why they are legitimate.
According to social contract theory, people make a tacit or implicit contract with one another that allows them to live under a government. Typically, they are said to agree to give up their sovereignty to the government. That is, the government now has the right to force people to comply with various laws. In return, the government is obliged to protect various fundamental rights (such as life, liberty and property) that people are said to have.
This is why the concept is referred to as a contract. There is a deal made in which the people give up sovereignty in exchange for protection of their basic rights.