Especially this: http://www.politicalphilosophy.info/socialcontracttheory.html
Let us know if you have further questions.
The origins of the state are to be thought of as a two way street of expectations between the governor and the governed. In this reciprocal relationship, the rulers are obligated to do their job for the subjects, and the subjects also have a role to fulfill under their rulers. The U.S. Declaration of Independence relies heavily on this concept, for example.