The Social Contract is a book in which Rousseau theorized about the best way to establish a political community in the face of the problems of commercial society, which he had already identified in his Discourse on Inequality (1754). It helped inspire political reforms or revolutions in Europe, especially in France. The Social Contract argued against the idea that monarchs were divinely empowered to legislate; as Rousseau asserts, only the people, who are sovereign, have that all-powerful right.
The stated aim of the Social Contract is to determine whether there can be a legitimate political authority, since people's interactions he saw at his time seemed to put them in a state far worse than the good one they were at the state of nature, even though living in isolation.
In this desired social contract, everyone will be free because they all forfeit the same amount of rights and impose the same duties on all. Rousseau argues that it is illogical for a man to surrender his freedom for slavery; thus, the participants must have a right to choose the laws under which they live. Although the contract imposes new laws, including those safeguarding and regulating property, a person can exit it at any time (except in a time of need, for this is desertion), and is again as free as when he was born.