Vietnam was called French Indochina from the time of imperialism, when the French took it over. When the French were defeated by Nazi Germany in World War II, the Vietnamese hoped to be independent, but the Japanese swooped in and invaded.
After World War II and the defeat of Nazi Germany and Japan, Vietnam again hoped to be free, but the French tried to retake it. Led by nationalist Ho Chi Mihn, the Vietnamese fought off the French. The United Nations–appeasing the two Cold War superpowers–divided the country into a two, a North that was communist and a South that was not. They were to be reunified later, but the dictator in the South refused (fearing that the people would vote for the communists).
When communist forces in the South started a guerrilla war to reunify the country into one communist state, the United States became involved. Motivated by their policy of containment and fear of the domino theory, the Americans wanted to stop South Vietnam from becoming communist in fear that it would cause the region to all follow.
The war was a mess. America kept getting deeper and deeper in the conflict, without achieving any ground. The war was unpopular in the States and America decided to pull out in 1975, as the communists took over the South.
Not only did containment not work, but American actions in neighboring Cambodia caused a communist revolt there, too.