Containment was a US foreign policy that was utilized during the Cold War. Containment was designed to "contain" communism to nations where it already existed. American leadership did not have confidence that they could easily bring an end to communism in nations like the Soviet Union and China, but they did believe they could contain it in those countries and prevent it from spreading to new countries.
The idea behind containment comes from the American diplomat George F. Kennan. Kennan was the US State Department adviser on Soviet affairs during the late 1940s. His policy was supported by President Harry Truman. This led to the development of the Truman Doctrine, which stated that the United States would provide economic, military, and political support to democratic nations that faced potential communist takeover.
Early examples of containment in action include the United States providing support to the Greek government as they fought a civil war against the Greek Communist Party. The United States also attempted to halt communism through economic support for Turkey. Financially, the United States also assisted the democracies of Western Europe through the Marshall Plan. The Marshall Plan provided Western European countries financial aid to rebuild after World War II. The hope was that this would positively impact Western Europe and halt Soviet attempts to influence Western Europe. Another example of containment in action was the United States involvement in the Korean War. The United States intervened to prevent a communist takeover of the Korean peninsula, which ultimately lead to a ceasefire. In these cases, it can be said that the policy of containment was successful, as communism failed to take hold in any of these cases.