This is a Karl Marx slogan. Marx is the founder of Marxist Communism, which is what the communism found in the Soviet Union, China, and other communist countries comes from. Marxism has evolved since Marx was around, but the basic idea of his theories can be summed up in this one quote: from each according to his abilities, to each according to his needs. The phrase comes from his 1875 publication, “Critique of the Gotha Program”. This was written before the rest of his Marxist theory writings, but it’s still pretty popular among those that hold that he was onto something.
For those who don’t know, Marx believed that communism was the ultimate goal. Capitalism, he held, was simply a stepping stone on that path, and one to be over with as soon as possible.