The Machu Picchu Train
Cusco/Ollantaytambo to Aguas Calientes
If you are not walking to Machu Picchu on the Inca Trail or other similar trek, you will take the train from Ollantaytambo or Cusco to Aguas Calientes. The train ride from Ollantaytambo takes about two hours. It is a scenic route along the Vilcanota River (on a lower section the same river is called the Urubamba River). Along the way there are a couple points where you can look high up on the canyon walls and see Inca ruins.
PeruRail & IncaRail
There appears to be two companies that sell train tickets: PeruRail and IncaRail. However, they are subsidiaries of the same company, created for the illusion of competition. One company controls ticket prices, which is why they are ridiculously high and sold in USD. The trains are owned by a foreign company, though they used to be a government-run public transportation service.
The Expedition & the Vistadome
The trains also have different “levels” of service. I have ridden both the PeruRail Expedition and Vistadome trains and found that the slight differences were not enough to justify the higher cost of the Vistadome. However, if the Expedition is sold out for the time and day that you want, you’ll have to take the Vistadome.