Initial Goals
The countries involved in the Korean War had set some different goals, The U.S' goals were to put an end to the spread of Communism, and its "Domino effect", the U.S wanted to protect South Korea from North Korea taking over. Communists forces in French Indochina planned to take over the country and drive out the French colonial government. (French Indochina now being Cambodia, Laos, and Vietnam.) Most of the countries were trying to help stop the communist forces, the other trying to take over and spread it.
The role of these initial goals of various countries on the Korean War was what mainly drove the support, the UN had interfered because they didn't want communism spreading more throughout the nations, and then the communist countries wanted to spread communism so they supported the opposing side.