Once you could travel without any problem around whole former USSR if you had the Russian tourist visa. Today you would be asked for a visa for every country you travel in ,or transit. It means, that if you intend to go by train from Russia to Uzbekistan, you would be asked for Kazakh transit visa, which can not be obtained at the border, by the way. Check it before you go. Another options is to cross Uzbek border from Turkmenistan, Kyrgizstan and Tadjikistan.
Afghan border is closed at present time.
Sometimes its possible to find cheap deals if you fly to Uzbekistan from Moscow. In Soviet era you could continue to Khiva via Turkmenian territory. Today this route is problematical. Bus is another option. Regular buses run between Tashkent, Samarkand and Bukhara.