During the Stone Age, people in China lived in small villages and had big men in charge, and then chieftains. But by the time of the Shang Dynasty, about 1800 BC, China was united into an empire and there was an emperor or empress who ruled over many smaller kings. Under these kings were a bunch of less powerful lords, and these lords ruled individual farmers. The lords collected taxes from the farmers, and passed some along to the kings, who passed some along to the emperor.
Under the Ch'in dynasty, about 200 BC, the emperors managed to get a lot more power and control of the government. Instead of letting local kings run local government, Ch'in sent out governors and judges that he had chosen himself, who were loyal to China and not to the local king. During the Han Dynasty, the emperors began to use examinations to choose the smartest men to be their governors and judges (they lost out on a lot of good governors by refusing to pick smart women though).
By the time of the Sui Dynasty, about 600 AD, the emperors ordered systematic census-keeping so that they would know how much taxes everybody should pay, and it would be more fair. They used those taxes to fight wars, and to dig big canals for transportation and irrigation. The T'ang Dynasty emperors continued the examinations and the census, but they also worked to promote trade as the Silk Road of Central Asia became more important. They fought more wars, and made China much bigger than before. Near the end of the T'ang Dynasty, the emperor Wuzong persecuted Buddhists and Manichaeans for their religion.
Under the Song Dynasty the government examinations became more and more important, but with the collapse of the Song Dynasty the Mongols invaded China from the north and Kublai Khan set up his own government. He put his own people - Arabs and Mongols and Jews and Christians - into power instead of Chinese people. Kublai Khan brought a lot of new ideas to China. He used tax policy and laws to encourage Chinese farmers to grow cotton for clothing instead of hemp.
What were schools like in ancient China?
What did Confucius say about government?