You're conflating Marxism with soviet-style socialism. Marxism in academia typically refers to an analysis framework where social dynamics are understood as a conflict between members of different social classes.
Marx said capitalism due to its nature would lead to a cycle of wealth inequality, overproduction, debt bubbles and financial crises, and that these would get worse over time. Capitalism would collapse due to this and be replaced not by communism but socialism.
Communism would be the system that comes after socialism.