If China hadn't gotten involved the UN forces would have taken the entire Korean peninsula. China was worried that the UN would keep going into China once it got to the border and decided to fight on...
China got involved in the war because by that time, UN forces had gotten pretty darn near the Chinese boarder, and they didn't want a UN force right at their doorstep. So they invaded and started...