Placed within the framework of the Cold War, the Korean and Vietnam Wars served as proxy wars between the US, China, and the Soviet Union. Many of the casualties inflicted on US forces during the Korean War were caused by an influx of Chinese soldiers who invaded North Korea in order to ensure that country's survival and to prevent an American invasion of China. North Vietnam used Soviet advisers and weaponry heavily; one reason why the war against North Vietnam did not escalate further was to limit damage to Soviet personnel that would trigger World War III.
One can also see these flashpoints of the Cold War as manipulations of the developing world against two superpowers. The leaders of both North and South Korea desired a unified Korea. North Korea asked China for aid; China approved this assistance, since North Korea was heavily influenced by Communist China anyway. After the US saved South Korea from falling, the South leader Rhee pushed for an invasion of the North in order to secure his own nationalist objectives. The US helped Rhee in the name of beating back communism, even though Rhee had some authoritarian tendencies in his own right.
Ho Chi Minh was a Vietnamese nationalist first and a communist second. He agitated for Vietnamese independence after WWI but was rudely rebuffed by the West. He also fought against the Japanese and French; to him, the US was just one more imperial power seeking to promote their own agenda at the expense of the Vietnamese people. The US backed South Vietnamese leadership even though they were corrupt and largely did not reflect the best interests of the people who lived there. South Vietnam was able to use the threat of communism to get billions of dollars in aid from the United States even though the US had little to gain economically from the country. North Vietnam was able to use the threat of Western influence in order to build its army and ultimately unify Vietnam under one flag.