To travel from China to Kazakhstan by train, you have once per week a direct overnight train from Ürümqi (or Urumqi / China) to Almaty (Kazakhstan). The journey time is about 36 hours. Buy your train ticket via the given booking link.
If you want to travel from Kazakhstan to Russia, buy your train ticket locally at a train station in Kazakhstan or via one of the given booking links. There are direct overnight trains available between both countries.
If you want to travel from Kazakhstan to Uzbekistan by train, buy your train ticket locally at a train station in Kazakhstan. Direct train connections available between both countries.