The policy of "containment" was a term coined by George Kennan, an official at the time in the foreign office in Moscow, in the 1940s as a mechanism for containing (hence the name) the threat of communism to prevent it from infiltrating eastern Europe but also Southeast Asia. It must be remembered that though the U.S. government, under President Truman, did use the containment policy effectively to buffer Europe from communistic tendencies and/or sympathies, it was first originated by Kennan.
The threat of communism's expansion came from Soviet Russia under Joseph Stalin. Though Mao Zedong was also a threat, he always deferred to Stalin and in many ways was a protege in the "cult" of Stalin. Zedong only broke with the Soviet Russia after Stalin died and Nikita Khrushchev took over, in the mid 1950s. Communism, under Stalin, was in constant conflict with capitalism. This is important to remember. Communism and capitalism were, at their very core, ideologically opposed. That is why Soviet Russia and Stalin were always chaffing against the West.
The policy of containment was not originally impacted by atomic weapons. Stalin was very leery of the West's possession of atomic weapons and, to be fair, was very reticent in his territorial push to acquire footholds in Southeast Asia and Eastern Europe. In fact, it can be argued that Stalin left his subordinates, like Mao Zedong in China and Kim in Korea to do his dirty work. But whenever the United States responded, Stalin was quick to back down.