There are different theories of how states came into being.The most important are
Hydraulic Theory proposed by Karl Wittofogel in Oriental Despotism: A Comparative Study of Total Power,1957.This argues that early states developed because of the invention and spread of systems of irrigation.These involved the necessity to control the labour of large number of people.
Coercive Theory was proposed by Robert Carneiro in an article in Science Magzine which says that states first emerged because of warfare in places with limited agricultural land.He used the example of the Inca of Peru but suggested that similar mechanisms operated elsewhere notably in the Nile and Indus Valleys and in ancient Mesopotamia.Pressures kept increasing as population experienced warfare between villages.Those who won subjugated those who lost and built up their power structures.
Class Theory can be traced back to Karl Marx and Friedrich Engels who argued that states arose as a result of antagonisms between social classes.
Social Contract Theory can be traced back to works of Thomas Hobbes,JohnLocke,Jean Jacques Rousseau in the 17th and 18th centuries.It believed that primitive people decided to give up liberty in order to have a social order and this order became the state.Anthropology distinguishes between state and society and hence this theory holds little interest for the anthropologists who work with small and stateless societies.