What are the inherent contradictions within capitalism which lead to socialism? And what are the contradictions which lead to Communism?

Contradiction in this sense means that some aspect central to capitalism and capitalist growth also undermines its sustainability. The things most necessary to capitalism are ultimately its undoing.

The foundational contradiction of capitalism is its unsustainability. It requires infinite growth on a finite planet. Either capitalism gives way to a system of exchange and production that is not premised on limitless growth or that system will collapse in on itself when value can no longer be created quickly enough to continue growth society.

The substitution of capital for labor cannot continue forever because complexity has hard limits with diminishing returns. Every additional unit of complexity requires marginally larger investments of capital and labor for marginally smaller returns. Even if we don't reach those limits quickly on the timescale of individual humans, we will on a cosmic timescale. That is inevitable.

And at the current pace, before we could ever dream of reaching those limits, the capitalist desire for profit at any cost will have made (at least most of) the earth uninhabitable.

Even if the bourgeoisie manage to colonize somewhere outside of earth, they will have only delayed the inevitable. Eventually they will have consumed all valuable capital in our solar system, and then they will have to travel exponentially larger distances to other solar systems to harvest the same kinds of materials to feed growth. And so forth.

Capitalism requires indefinite growth but cannot continue indefinitely. That's its contradiction and every other problem of the system emerges from that.

/r/communism101 Thread