The formation of a new government is largely dependent on the type of government envisioned: For instance, in the case of a dictatorship or absolutist government, then the primary element is force. Assuming however that one subscribes to the Social Contract theory of the formation of government as expressed by John Locke, then one must begin with a group of people who have expressed the desire and willingness to form a body politic. This group must then decide on the rules under which it will operate and how those rules will be enforced. It must also decide how its policy decisions will be determined and implemented. It must decide if that government will be a representative body or operate by the act of all participants. Once these decisions are made, the group can then reduce its plan for governing to a written document which "constitutes" or establish the government, thus becoming a "constitution." From then, as long as the majority agree to abide by the provisions of the government and its founding document, a government is formed and operational.
This is description is, by necessity overly simplistic, and of necessity involves a number of broad assumptions; yet this is perhaps the simplest and most direct way in which one can establish a representative government.