Government is an institution that enforces public policies through central authority to maintain order and provide services. There are various theories for how governments formed, including that people consented to give up some rights in exchange for protection. The US government is based on ideas of natural rights from John Locke and a system of checks and balances between three branches: the legislative, executive, and judicial branches. Other types of governments include presidential, parliamentary, dictatorial, direct democracy, and representative democracy systems.