In The Social Contract, Jean-Jacques Rousseau discusses a lot of issues related to the condition of man and the development of society. In this section, from the middle of the first book through the middle of the second book, Rousseau focuses on the social compact of man, the sovereign state, property ownership, and the law, among other topics. This is a brief summary of this section.
According to Rousseau, man gives up his individual natural freedom and joins others in order to protect his liberty. In the natural world, each man is responsible for only himself, and it is a world of take what you want and survival of the fittest. By giving up that individuality and joining with others, man makes a compact to give up some of that individuality in order to gain liberty. Liberty means that each man is looking out for each other, which actually means that each is looking out for themselves.
This compact results in the creation of a sovereign state, which gets its power and authority from the people. The people agree to be part of this sovereign state and give the sovereign state the authority to make decisions for the good of all of the people.
Part of the benefits of this compact is that now an individual can actually own property and real estate. He does not have to worry about fighting to keep what is his because others will respect his ownership, just as he respects theirs.
The general will of the people is what governs the actions of the sovereignty, but an issue can arise because the people do not fully understand what it is they want. The people also give the sovereignty the right to make just laws and punish those who break the laws. The individual who breaks the laws is saying to the people that they do not want to be part of the compact, therefore it is just and right for the sovereignty, with the permission of the people, to banish the wrongdoer, or even put them to death for more serious crimes, to protect the rest of the people.
References
Rousseau, Jean-Jacques. "The Social Contract." 2015. earlymoderntexts.com. Ed. J. Bennett. Online. 13 March 2016. <http://www.earlymoderntexts.com/assets/pdfs/rousseau1762.pdf>.