Containment was an official U.S. policy throughout the Cold War with the Soviet Union. The term originated with U.S. diplomat George F. Kennan in 1946, and referred to halting the spread of communism and working to prevent communism from taking hold in certain countries. The idea was the basis of U.S. foreign policy during the Cold War, and many presidents employed the policy to justify various U.S. interventions across the world.
Containment is most closely associated with Harry Truman, who was president at the end of World War II and the start of the Cold War. Truman announced containment as an official U.S. policy in March of 1947, and used it immediately to prevent communism from spreading across Europe by authorizing financial aid to anti-communist forces in Greece and Turkey, and to the Marshall Plan, authorized to help rebuild Western European economies destroyed in World War II. The Korean War, fought against Soviet-supported North Korea and Chinese troops from 1950 to 1953, was also another attempt at containing communism during Truman's presidency.
Eisenhower, Kennedy and Johnson
While Truman's successor, Republican Dwight D. Eisenhower continued the Korean War, he was not as ardent about containment. When the USSR invaded Hungary in 1956, Eisenhower chose not to intervene. His successors, Democrats John F. Kennedy and Lyndon B. Johnson, however, supported Truman's policy of containment. Kennedy attempted to stop Cuba from becoming Communist in 1961 with his failed Bay of Pigs invasion, and he began deploying troops to Vietnam, a policy which Johnson escalated during his presidency between 1964 and 1969.
Nixon and Detente
Republican Richard Nixon practiced detente, a softening of relations with communist countries. He pulled U.S. troops from Vietnam beginning in 1969 and gradually began ending the war. He also made his historic visit to China in 1972 to open diplomatic and trade relations with the country.
Carter and Reagan
Democrat Jimmy Carter continued detente until the Soviet Union's 1979 invasion of Afghanistan. With this invasion, Carter returned the U.S. to a policy of containment by using the CIA to arm rebels in Afghanistan to prevent a communist takeover. His successor, Republican Ronald Reagan, continued to arm rebels in Afghanistan and other countries where communism made inroads, such as in Angola, Cambodia and Nicaragua.