The Mexican government is a representative government, with the technical term being a "federal republic." It is also called a federation.
The basis of this government is a Constitution, which provides a governmental blueprint for the 31 United Mexican States and the Federal District. The Constitution describes the responsibilities and powers assigned to the three branches of the federal government and how that federal government interacts with the state governments. Further, each of the 31 states is divided into municipalities.
On the federal level, the Mexican government has three branches: Executive, Legislative, and Judicial. The president is the head of the Executive Branch and the Armed Forces and is also the nominal head of the country. The president of Mexico, who is elected by direct popular vote, serves a six-year term, and cannot be re-elected. The Executive Branch also has Departments, much like the American Cabinet.
The Legislative Branch of the Mexican government is bicameral, with the Chamber of Representatives having 500 members and the Chamber of the Senate having 128 members. Members of the lower house serve for three-year terms, and Senators serve for six years. These two houses pass laws, approve spending and budget bills, declare war on other countries, and approve presidential appointments.
The Judicial Branch of the Mexican government has a high court, the Supreme Court of Justice of the Nation, and several other courts and tribunals as well, including district courts that oversee various parts of the country. The Supreme Court can rule on specific cases only, not on broad Constitutional issues.
The Mexican government has a Federal District, which houses the federal government. The Federal District is a physical place and a territory, bordering Mexico City, which is the country's capital city. This is not counted as one of the states, and is much like the United States' District of Columbia.
On the state level, the Mexican government is similar to that of the federal level. Each state has three branches, with a governor heading up the executive branch, a high court heading up the judicial branch, and one chamber heading up the legislative branch. Each state is considered a sovereign entity and is free to make its own constitution, which can govern itself and its relations with other states but not with other countries.
The local level of the Mexican government is comprised of more than 2,400 municipalities. Each municipality has a president and a council. As with many other representative governments, the members of the municipal government are elected at fixed intervals by their peers.