As theorists in the matters of human nature and the notion of society and its organization. Both Locke and Hobbes have very different views regarding how the social contract is established and what's the government's role in maintaining peace, justice and order. For Locke, the function of government was to deliver justice in a appropriate manner as an outcome of people voluntarily giving up our natural right to enact retribution and configuring a civil society and a state whose role is to guarantee people's private property and safety.
Meanwhile, Hobbes conception of government was one of a totalitarian agent who all men most obey a sovereign leader, an absolute power who can guarantee their survival, it is unquestionable and its will is always just. Men agree to give up their personal liberties in exchange of order and safety, which can only exist if they all faithfully obey the state.