A Chief Minister, is the elected head of government of a province in Pakistan. The chief minister is the head of the provincial government, whereas in contrast, the governor is the nominal head, or the “de jure executive” and does everything under the guidance of the chief minister.
The CM is elected by the provincial assembly, and is the leader of the provincial Legislature. The parliamentary system in Pakistan follows the Westminster system.
Hence the ministers of the provinces are elected by the members of the legislature, and the majority party is invited to elect a leader, whose tenure lasts for five years. The people do not elect the head of the government, rather they elect their representatives only.
In turn their representatives select the head of the government. But once the head of the government is elected, he or she enjoys almost exclusive executive powers.