Answer:
John Locke essentially believed in and helped to develope what is now known as the "Social Contract Theory". (This wasn't an actual written agreement, it was more of an unspoken rule.)
The whole idea behind the Social Contract Theory is that people are expected to give up some of their natural rights, and in return they receive protection and other privileges from the government. Another benefit to this idea, was that if the government were to ever get too powerful and fail to protect the people's rights, since it's an agreement between the government and the people, the people have all the right to overthrow that government. In the declaration of independence people also have similar rights, that are listed there for us to protect us.