I have just read about them both in an introductory book to philosophy, but I am confused between the interpretations of these two people, of the "social contract" in political philosophy.
The source of differences between Hobbes’ and Locke’ social contracts is their differing conceptions of the state of nature. For Hobbes absolute freedom is all that individuals have in the state of nature. Each can take whatever she wants from others. In the state of nature, there are "No arts; no letters; no society... worst of all, [there are] continual fear, and danger of violent death: and the life of man, solitary, poor, nasty, brutish and short." (in Leviathan) According to Hobbes, this grim picture of the state of nature motivates individuals to come together to draft a social contract. Individuals would relinquish their rights to absolute liberty in exchange for the protection and security offered by the sovereign. Hobbes maintains that the fact that life in the nation state is far better than that of natural state leads to the absolute sovereignty. For this reason, people will collectively relinquish their right to revolt. The only occasion an individual is entitled to resist the sovereign force is to preserve her own life. In other words, the contract is null for an individual if the sovereign tries to take away her life. Some scholars maintain that this right to self-preservation can be viewed as the right to revolt, but the majority opinion is that Hobbes denies the right to revolt.
Opposing Hobbes, Locke argues that the people do have the right to revolt. The reason, for him, is that the state of nature is not as dire as Hobbes imagines. In the state of nature, according to Locke, people have the God-given natural rights: the right to life, liberty, and property. The problem of the natural state, to Locke, is that individuals disagree on the interpretations of the rights and on the proper punishment of the right violators. This ambiguity and potential disputes are the motivations for individuals to come together to draft a social contract. The power of the sovereign is justified (or legitimate) if and only if the power is used to protect the natural rights of individuals (i.e., for the benefits of the people). The contract is null if the sovereign neglects this duty. To Locke, the null condition is expressed by the right to revolt.
The nature of the social contract is the question here, not the state of nature - though this has background relevance.
An old text - Pollock's - is highly illuminating.
Hobbes's Original Contract
The peculiar and fundamental point of Hobbes's construction is the form of his original contract.
There is only one contract: it is a contract of allegiance made not between ruler and subjects, but between those only who agree to transfer all their natural right to the ruler or rulers whom they will henceforth obey. The sovereign thus instituted (not necessarily one person, but in any case bearing the person of the commonwealth) is not a party to the covenant. He promises nothing to the subjects, and is bound only by the law of nature to exercise his power reasonably. His right is derived not from any promise made to him, but from the power conferred upon him. Hence there can be no legal limitation of sovereignty, and to talk of a limited or mixed government comes only of confused thinking.
This single original contract must be classed as pactum subiectionis [a pact of subjection: GT] rather than pactum unionis [a pact to form a society of political equals: GT]. (Frederick Pollock, 'Hobbes and Locke: The Social Contract in English Political Philosophy', Journal of the Society of Comparative Legislation, Vol. 9, No. 1 (1908), pp. 107-112: 109-110.)
Hobbes' political thought in Leviathan (1651) is animated by the French Wars of Religion and the English Civil Wars. He depicts a dire 'state of nature' - of life without the state. This is an abstract model of what happens or of how life will inevitably tend in the absence of supreme coercive power. The wars of his time and the recent past give a glimpse of how bad life can be without such a power but the state of nature as Hobbes describes it in its full horror as 'a state of war, where every man is enemy to every man' (Leviathan, ch. 13) is not to be taken as a literal historical description. Things could get as bad as this and have approximated to it. The social contract is the only firm barrier against either eventuality.
Locke's Social Contract
There are two contracts on Locke's view.
Hobbes argued strenuously for absolute power. Locke was abundantly cautious to avoid making any statement or admission which might lead to the inference of absolute power anywhere.
For Locke the state of nature is not a state of war ... but only a state in which peace is not secure. The natural law of self-preservation includes a moral duty to preserve the rest of mankind so far as possible (Second Treatise of Civil Government 'ST'), 1690, ii. §6). The natural power of every man has already a moral and even judicial character. Locke is therefore not an unqualified individualist like Hobbes.
The state of nature is generally peaceable, and Locke believes that it has historical and in parts of the world contemporaneous reality (ST, ii, §14). It is attended, however, with certain 'inconveniences' (ST, vii, §91) mainly connected with each person's having 'the Executive Power of the Law of Nature (ST, ii, §13) - that is, being a judge in his own cause in the absence of any overarching authority.
Locke's first contract
Civil society is formed by every man giving up his natural power; not to a sovereign but " into the hands of the Community" or " to the publick." The authority so conferred upon the society is granted only to be used for the public good (vii. §87). [This is the first contract - for the security of natural rights. : GT]
The first contract can be revoked by the citizenry if necessary by recourse to revolution if power is not used effectively for, or contrary to, the public good.
The next step is that the society, being formed, establishes a government with legislative and executive organs by the decision of the majority. The right of the majority is founded simply on the necessity of the case, because otherwise no collective action would be possible (viii. §96).
Locke's second contract
Locke does not say in terms whether he regards this as involving a secondary contract or covenant of allegiance ..., and it is difficult to make out exactly what his formal conception was. It would rather seem that he purposely avoids committing himself. On the whole I submit that he does postulate an auxiliary compact of all the citizens to be bound by the government and laws which the society shall establish (viii. §122). This compact is not made once for all, but is constantly renewed in the person of every man who becomes a subject and member of the commonwealth by promising allegiance. [This is the second contract - for convenience of collective decision-making.] (Pollock: 110-111.)
(1) Hobbes' sovereign is not a party to any contract and has no obligation to protect his citizens' natural rights.
(2) Locke has two contracts (between citizens and citizens, and between citizens and the government) in place of Hobbes' single contract (between citizens to obey the sovereign).
(3) The second contract is not made once for all, because Locke recognises the legitimacy of revolution, though under complex conditions (ST, xix passim), if the government and laws fail to provide adequate security of natural rights. Hobbes's sovereign is free from the legitimacy of revolution, though if his power fails and he is unable to preserve civil peace there is no obligation for citizens to obey.
Hobbes, Leviathan : https://www.gutenberg.org/files/3207/3207-h/3207-h.htm
Locke, Second Treatise : https://www.gutenberg.org/files/7370/7370-h/7370-h.htm
Frederick Pollock, 'Hobbes and Locke: The Social Contract in English Political Philosophy', Journal of the Society of Comparative Legislation, Vol. 9, No. 1 (1908), pp. 107-112.