On June 25, 1950, the Korean Warbegan when North Korea, supported by the Soviet Union and China, invaded South Korea, which was supported by the United States. General MacArthur, leader of the United Nations forces, drove the North Koreans back across the divide, yet encountered a Chinese invasion.
Basically, the U.S was a fellow supporter of south korea, and that's how they got included.