The Government of the Commonwealth of Pennsylvania is the governmental structure of the state of Pennsylvania as established by the Pennsylvania Constitution. It is composed of three branches: executive, legislative and judicial. The capital of the Commonwealth is Harrisburg.
The elected officers are:
In Pennsylvania all members of the executive branch are not on the ballot in the same year: elections for governor and lieutenant governor are held in even years when there is not a presidential election, while the other three statewide offices are elected in presidential election years.
The Governor's Cabinet comprises the directors of various state agencies: 
- Department of Community and Economic Development (DCED)
- Department of Aging
- Office of General Counsel (OGC)
- Department of Insurance
- Department of Corrections (DOC)
- Department of Transportation (PennDOT)
- Department of State (DOS)
- Department of General Services (DGS)
- Department of Conservation and Natural Resources (DCNR)
- Emergency Management Agency (PEMA)
- Department of Health
- Department of Banking and Securities (DoBS)
- Office of the Budget
- Department of Environmental Protection (DEP)
- Pennsylvania State Police (PSP)
- Office of Inspector General (OIG)
- Department of Human Services (formally Department of Public Welfare) (DHS)
- Department of Labor & Industry (L&I)
- Department of Agriculture
- Department of Revenue
- Department of Military and Veterans Affairs (DMVA)
- Office of Administration (OA)
- Department of Education (PDE)
- Department of Drug and Alcohol Programs (DDAP)
The Pennsylvania General Assembly is the bicameral state legislature composed of 253 members: the House of Representatives with 203 members,  and the Senate with 50 members.  The Speaker of the House of Representatives or their designated speaker pro tempore holds sessions of the House. The President of the Senate is the Lieutenant Governor, who has no vote except in the event of tie in the Senate, where the vote is 25-25. The legislature meets in the Pennsylvania State Capitol in Harrisburg. Its session laws are published in the official Laws of Pennsylvania,  which are codified in the Pennsylvania Consolidated Statutes.   Members of the Senate and the House cannot hold a position in any civic office, and both the houses may expel a member with two-thirds vote. Any member who is expelled for corruption may never run again for reelection in either portion of the legislature. 
Pennsylvania is divided into 60 judicial districts,  most of which (except Philadelphia) have magisterial district judges (formerly called district justices and justices of the peace), who preside mainly over minor criminal offenses and small civil claims. Magisterial District Judges also preside over preliminary hearings in all misdemeanor and felony criminal cases.  Most criminal and civil cases originate in the Courts of Common Pleas, which also serve as appellate courts to the district judges and for local agency decisions.  The Superior Court hears all appeals from the Courts of Common Pleas not expressly designated to the Commonwealth Court or Supreme Court of Pennsylvania. It also has original jurisdiction to review warrants for wiretap surveillance.  The Commonwealth Court is limited to appeals from final orders of certain state agencies and certain designated cases from the Courts of Common Pleas.  The Supreme Court of Pennsylvania is the final appellate court. All judges in Pennsylvania are elected; the chief justice is determined by seniority. 
In total, 439 judges preside over the Court of Common Pleas, 9 judges preside over the Commonwealth Court, 15 judges preside over the Superior Court, and 7 justices preside over the Supreme Court. Elected judges run in 10 year terms, at which point they are required to run in a non-partisan retention election if they wish to continue to serve. 
Local government in Pennsylvania consists of five types of local governments: county, township, borough, city, and school district.  All of Pennsylvania is included in one of the state's 67 counties and each county is then divided into one of the state's 2,562 municipalities. There are no independent cities or unincorporated territory within Pennsylvania. Local municipalities are either governed by statutes enacted by the Pennsylvania Legislature and administered through the Pennsylvania Code, by a home rule charter or optional form of government adopted by the municipality with consent of the Legislature.  Municipalities may enact and enforce local ordinances. 
Pennsylvania enacted the Local Government Commission in 1935, by an Act of Assembly. The commission is one of the oldest in the country, composed of five members of the state Senate and House of Representatives who are appointed by the President Pro Tempore of the Senate and the Speaker of the House. The commission provides assistance to Members of the General Assembly on researching local issues. 
- "Cabinet and Executive Staff". Governor of Pennsylvania. Retrieved 17 March 2014.
- "Reader's Guide to the Pennsylvania Bulletin and Pennsylvania Code" (PDF). Pennsylvania Bulletin. Pennsylvania Legislative Reference Bureau. 31 (7): 919. 17 February 2001.
- "About the Pennsylvania Code". Pennsylvania Legislative Reference Bureau. Retrieved 15 August 2013.
- "Members of the House". Pennsylvania General Assembly. Retrieved 17 March 2014.
- "Members of the Senate". Pennsylvania General Assembly. Retrieved 17 March 2014.
- "Pennsylvania Session Laws > Introduction to Pamphlet Laws". Pennsylvania Legislative Reference Bureau. Retrieved 15 August 2013.
- Prince, Mary Miles. Prince's Bieber Dictionary of Legal Citations (6th ed.). Wm. S. Hein Publishing. p. 343. ISBN 1-57588-669-3. LCCN 2001024375.
- "Pennsylvania Session Laws > FAQ". Pennsylvania Legislative Reference Bureau. Retrieved 15 August 2013.
- Inc., US Legal,. "Pennsylvania State Legislature – System". system.uslegal.com. Retrieved 2016-12-09.
- Judicial districts Archived August 29, 2007, at the Wayback Machine
- "Judicial selection in Pennsylvania - Ballotpedia". Retrieved 2016-12-09.
- Commonwealth of Pennsylvania. Constitution. Article III Section 20.
- The Pennsylvania Manual, Page 6-3.
- Solicitor's Handbook (3rd ed.). Pennsylvania Department of Community and Economic Development. April 2003. pp. 1–4, 15–18.
- keenthemes. "-CUSTOMER VALUE-". -CUSTOMER VALUE-. Retrieved 2016-12-09.