Chinese communist leader Mao Zedong declared the establishment of The People's Republic of China on October 1, 1949. This was after victory in the Chinese civil war that had been waged since 1945, immediately after the Second World War had ended. In the civil war, ultimately Chinese nationalists were defeated and driven from mainland China.
For a long time, the world community (as represented by the United Nations) refused to recognize the People's Republic of China as legitimate, and continued to look at the Republic of China -- the Chinese national government in exile on the island of Taiwan -- as the legitimate government of China. It was not until 1971 that the People's Republic of China was recognized and given membership status in the UN.