Broadly (and it's a long time since I read on this, so it's what I remember from a while ago), he argued that individuals choose to yield some of their rights to the State.
In exchange the State has to be fair.
That is to say, the Police, or other law-enforcement agencies have no power, except insofar as the mass of population chooses to obey them,
If enough of the population decides that they do not trust the Police (for example), then civil unrest or other consequences will leave the Police ineffectual.
This applies in democracies. Not in totalitarian States.
His main argument is that the laws of nature are abhorrent - any creature can kill or maim any other and there is no penalty for doing that. To a civilised person, this is intolerable, so the individual will yield some freedoms in order that another authority can impose rules on society that bring some level of civilisation.
His main contribution was to write God out of the system. Previous thinkers took the view that the rules of society are laid down by God (the 10 Commandments and so on). Locke was the first (I think) to suggest that society is a human construct, and is governed by human rules.
This, for the first time, gave an intellectual basis for rebellion against a bad government.
Not a popular view with Royalty in the period surrounding the 'Glorious Revolution' But one that contributed significantly to the development of British government.