Hobbes's concept of the state of nature is grim, to say the least. In Hobbes's view, without a powerful sovereign to keep people in line, humans will constantly be at each other's throats, robbing, cheating, and stealing with almost total impunity. In a state of nature, men—and Hobbes, in keeping with the standards of the time, refers to humans in general as "men"—are unable to enjoy any kind of security, either of person or property.
But as men are still rational in a state of nature, they are able to realize that such chaos and disorder cannot be allowed to continue for much longer. So they agree to come together and establish a government that will impose order and ensure some measure of security.
In doing so, each man will give up his freedom to a sovereign, an absolute ruler who will henceforth have unlimited power to keep the peace. Though everyone else in society will have left the state of nature, the sovereign will remain in it. He will be able to do largely as he pleases in pursuit of his overriding goals.
Locke's version of the social contract theory is somewhat different to Hobbes's. Although he, too, paints a pretty grim picture of life in the state of nature, he doesn't conceptually give the sovereign absolute power. On the contrary, he thinks that such power is conditional on the sovereign's protecting the property rights of the people. If he can't do that, then the people are entitled to revert briefly to a state of nature and depose him. Then they will replace him with a sovereign who can do what he's supposed to do. This is effectively what the American colonists did in relation to the British. It's no wonder, then, that they were strongly influence by Locke's theories.
For Rousseau, man in a state of nature is innocent and pure, as yet uncorrupted by society. His position is akin to that of Adam and Eve before they defied God by eating of the Tree of Knowledge. Yet men in a state of nature are also rational; they have an intrinsic understanding of what is good for humanity as a whole.
As political society develops and men in a state of nature become citizens, they follow their consciences, looking into their souls to discover the rational notion of justice that resides there. In doing so, citizens collectively divine what Rousseau calls the general will, which forms the basis of the common good for political society.