This policy was called "containment" - the idea was to contain communism from spreading to new countries without trying to actively challenge the communist system in the countries that already had it.
This policy lead to some proxy wars, in which the US fought the Soviet Union for the free countries.