Every society with a government has some sort of explanation for why particular people hold power. For example, in the United States, we say that our Constitution embodies the will of “the People” because representatives in each state voted to ratify the Constitution. We also accept that a particular person is President because they are elected (indirectly) by voters. For us, voting is a way of expressing what “the People'' want. Being elected gives people the right to temporarily hold political power.
In China, the Mandate of Heaven explained why a particular dynasty (extended family) held power. This idea began during the Zhou Dynasty and was used through the end of the Qing Dynasty (i.e. ~1000 BCE - 1911 CE). This philosophy asserted that Heaven granted the right to rule to a particular man and his male heirs. “Heaven” meant the natural order and force for moral good in the universe, not a spiritual place or a personified deity.
According to this belief, the founder of each dynasty earned the Mandate through personal virtue and it was up to his descendants to maintain it by ruling well. When his descendants stopped protecting the welfare and prosperity of the people, China would experience natural disasters, invasions, and/or peasant rebellions - all signs a dynasty had lost the Mandate. If a new leader rose up, successfully overthrew the old dynasty, and held onto power, then eventually people acknowledged that the Mandate had passed to his family. In other words, a new leader proved his right to rule by forcefully taking power and then ruling well enough to hold onto power. The Chinese emperor was referred to as the “Son of Heaven” to indicate that he held this Mandate.
The actual political history of China was more complicated than this sounds. There were many periods in Chinese history - sometimes multiple centuries long - when the region was disunited, with two or more leaders claiming the Mandate at the same time.