Both Hobbes and Locke offer what are called social contract theories. These are political theories designed to offer an account of the relation between the state and the individual. Where they differ, however, is in the precise nature of the social contract theories they put forward.
For Hobbes, the state is all-powerful. It had originally been set up in a state of nature, where the law of the jungle prevailed, by men who wanted to put an end to ceaseless strife and protect their lives and property. So they got together to invest one man with absolute power in order to keep the peace and stop everyone from constantly being at each other's throats.
According to Hobbes, the sovereignty of the monarch is indissoluble and cannot be challenged. He maintains that individuals do have the right to defend themselves against a tyrannical ruler, but this is only in extreme circumstances. For the sovereign to do his job properly, he must be invested with absolute power. There can therefore be no question of citizens questioning the sovereign's actions, let alone overthrowing him in a violent uprising.
Locke also regards the state as having an instrumental role. He believes it was formed for the sole basis of protecting private property. In that sense, there are similarities between his social contract theory and Hobbes'. Where he departs from Hobbes, however, is in the power he gives to the state within his ideal system. For Locke, the state only exists on sufferance; in other words, it only exists for as long as it can fulfill its side of the bargain with civil society: namely, to protect private property.
If the state doesn't does this, for whatever reason, then the people—i.e. men of property—are perfectly entitled to rise up and replace it with one that will, by force if necessary. In Locke's system, the state has limited powers that must be held in check by civil society through the rule of law. Contrast this with Hobbes, for whom the state enjoys absolute power and is a complete law unto itself.