Why did the UN send an international force to Korea?
The UN Security Council passed Resolution 84, sponsored by the United States, to respond to the North Korean invasion of the South.
South Korea was largely an American creation after World War 2 as North Korea was a Soviet creation.
Russia was boycotting the United Nations Security Council as they felt the new Mainland China Communist Government should have a Permanent Security Council Seat not the Nationalist Chinese Government in Taiwan.
The Korean War was referred to as a "Police Action" and 16 countries sent Troops while others sent Medical and other support.
The essential motivator for the American action was the Truman Doctrine which tried to contain Communism by supporting "free peoples" and made emergency resources available to the US government much of it in the form of Aid but also military force if necessary. North Korea's blatant attack cried out for US intervention.
The Truman Doctrine was first put forward in March 1947 as a way of fighting the Communists in Greece and Turkey at the time and justified many United States interventions thereafter. The intervention was on anticommunist side and the not necessarily democratic side, led to the support not so much "free people" as those willing to fight Communism. This led the US to a lot of risky meddling and support for less than savory governments all over the world. The War in Vietnam could be seen as a result of this doctrine.
The Korean War showed how unready the United State Military was for combat. It had great difficulty pulling together a force adequate for the fight. The Korean War is still theoretically active today.