Why did the chinese left?

In 1962 war was china able to get in deep? And if yes then how much inside our territory? But then Why did they left?