Actually, Cao Cao unified the northern part of China during his life and became the man who's in power of the Han dynasty though he never took the throne of Han dynasty. After his death, his son Cao Pi carried on what his father(Cao Cao) had done and ended the history of Han. Cao Pi himself became the first emperor of Wei, the first and most powerful kingdom of the three kingdoms. Before the establishment of Wei, Liu Bei established Shu in the south-western part of China while Sun Quan established Wu in the east, and there were three kingdoms. We say that Wei is the most powerful one because Wei's territory contains the most rich part of China in that time and it had far more population than the other two kingdoms. Shu and Wu occupied lots of land of China too! Although Wei was so powerful, Cao Cao, Cao Pi, and Cao Pi's succesor Cao Rui(曹睿) never got the chance to unify the whole China, for Wei was not powerful enough to defeat the other two kingdoms at the same time. Shu and Wu would form an alliance while Wei became aggressive. After the death of Cao Rui, Sema Yi(司马懿) from the Sema family was in power of Wei after he defeated his rival Cao Zhen(曹真), and his family became the real rulers of Wei(though the emperor of Wei were still from Cao family). After a few years, Shu became really weak because it had spent lots of money and soldiers on campaigns against Wei(Shu in the offense), and Sema Zhao(司马昭), the real ruler of Wei sent his army to Shu and destroyed that kingdom. After that, only two kingdoms left, Wei(ruled by the Sema family, emperor from Cao family), and Wu(ruled by the Sun family and emperors from the Sun family as well). At this time Sema Yan(司马炎) took the throne of Wei and established Jin(晋). After another few years, Jin destroyed Wu and unified the whole China.(Jin is actually Wei with a new royal family, and though it was not powerful to defeat the other two kingdoms at the same time, it was powerful enough to defeat one.)