The name for this idea is "Domino Effect" - this is a theory that says that if one country falls to Communism the neighboring countries would also fall to Communism, much like pieces of Dominos fall when a neighboring piece fell.
This theory was important in the Foreign politics of the US during the cold war.