To understand this, look at the words of the Declaration of Independence.
In that document, Thomas Jefferson tells us that the reason for government is to protect the "life, liberty, and pursuit of happiness" of its people. Furthermore, the government only gets its "just power" from the consent of the people. This is a classic statement of the idea of social contract. It says that people consent to have a government so that it will protect their rights.
Jefferson goes on to say that the British government had stopped protecting the people's rights and was, instead, infringing on them. Because of that, he said, the people had the right to rebel. In other words, the government had broken the social contract and rebellion was, therefore, justified.