Marx acknowledged that Capitalism in its time had been a very dynamic system, that had increased the productivity of labor and broken down outmoded and irrational customs. However, the experience of his time (the middle of the nineteenth century) suggested to Marx that it was getting less stable. It was generally believed by the Classical Political Economists that the rate of profit would tend to decline toward zero, over time; and Marx accepted this. At the same time, it seemed to Marx and many others that the working class were getting poorer. These three tendencies -- increasing instability, a falling profit margin and the "immiserization" of the working class -- could not go on forever. Eventually they would lead to a crisis, the collapse of the Capitalist system. The working class, already highly regimented by the employers, would be ready to take over.
It is hard to understand how profit margins could fall and the working class be immiserized at the same time, though. (Some modern neoclassical economists would say very confidently that it is hard to understand because it cannot happen). Marx tried to explain the point by analyzing what he called the "organic composition of capital."
Let's see how he approached the problem: