Communism worked in China, for some definition of "worked". Stalinism eventually failed in the USSR and elsewhere. An extensive literature explains these things, as well as explaining different forms and varieties of "communism", and things that people call "communism" but aren't.
Communism worked so well in China that as soon as they adopted something resembling free markets in some regions, thanks to Deng Xiaoping, their GDP per capita rose amazingly fast for 3~4 decades. Not exactly a stellar example.
China is still communist. Again communism has worked for some definition of "worked". This is an objective statement, not an endorsement of Chinese communism.