Locke starts off by arguing that the governing factor in civil society must be the majority, for practical reasons. By entering into civil society, the individual submits him or herself to the majority, and agrees to abide by the rules and decisions of the majority.
Locke then addresses two hypothetical arguments against this model. First he discusses the lack of historical precedence for government by majority rule. Locke concedes that there are many examples in the modern world and throughout history of absolute power--czars, kings, sheiks, and so on. However, he notes that societies often forget their origins, and that in fact "the beginning of politic society depends upon the consent of individuals, to join into, and make one society." He then cites historical examples supporting this idea. He concludes once again with his paternal model, putting great credibility in its historical accuracy--people coming together, and willingly submitting themselves to a central male figure's control, either within their own family or a group of families. However, even in this situation, the establishment of government is by consent, as it must be to ensure the peaceful formation of all civil societies (he notes that he will address conquest, which is clearly not consensual, in a later portion).
Since people are all born under some government, they are not in fact free and at liberty to unite together to change that government. Locke's response is that, although someone may bind himself to a given government, he cannot bind his children--they are born free and must make the decision about whether to ally themselves with their parents' government. Once again, "consent makes any one a member of any commonwealth." In Chapter 9, Locke reiterates why people would give up their natural freedom to enter into society--namely, to assure the protection of their lives, liberties, and estates, all of which Locke considers property.
Nature lacks three very important things, all of which a just civil society provides: "an established, settled, known law"; "a known and indifferent judge"; and the "power to back and support the sentence" In order to gain the three things above, people must relinquish their natural rights. These include the right to do as they wish within the bounds of the law of nature; the power to punish the crimes committed against natural law. The first right is partially given up by submitting oneself to the laws of civil society, which are stricter than those of nature. The second right is given up totally in favor of putting oneself under the protection of the executive power of the society. Locke finishes by noting that this system is contingent on the three characteristics of civil society mentioned above--a law, a judge, and an executive working "to no other end, but the peace, safety, and public good of the people."
This section represents the end of the first portion of the Second Treatise of Government. By this point, Locke has defined the state of nature, outlined the formation and goals of a just civil society (the word "ends" in the title of Chapter 9 should be read as "goals"), and the principles behind that society.
To review, briefly: in the state of nature, people are completely free and independent. Everyone is subject to natural law, however, and may execute that law when someone threatens his or her natural rights. People amass property in the state of nature, first by adding their labor to the land and the products of the land, then by bartering, and eventually developing money and acquiring the ability to gather large amounts of property together. At this point, natural law is no longer an adequate protection for the property and liberty of individuals, so people enter into civil society to protect themselves. By entering into society, people relinquish their freedom under natural law, and their right to execute law. Instead, in this society, they establish a judicial power to arbitrate disputes between members of the society, a set of laws that all the members of the society must obey, and an executive power to maintain and enforce the law. This commonwealth is valid and just so long as these three common powers serve to the best advantage of all of those who have relinquished their rights to join it.