The journey from the pretty village of Ollantaytambo to Aguas Calientes—the town closest to Machu Picchu—is one of the most common routes undertaken by travelers to Peru. Everyone wants to see the famous Inca ruins of Machu Picchu. And the main way of getting there, aside from hiking on the Inca Trail, is to take the train from Ollantaytambo to Aguas Calientes.
In fact, except for the hugely circuitous route via Santa Teresa (which no one who has the aim of getting to Aguas Calientes would take) train travel is the only way to get between these destinations. That is, of course, unless you combine a taxi to Km 82 with the Inca Trail from there, but this would have to be arranged many months in advance and you would visit Machu Picchu first before going to Aguas Calientes.
By Train
Duration: 1.5-2 hours
Two train companies offer scheduled services to Aguas Calientes from Ollantaytambo: Inca Rail and Peru Rail. Departures are numerous throughout the day. Inca Rail has seven services, mostly in the mornings, on their Voyager, 360° and First Class trains. Peru Rail has two types of train, the Expedition (four per day) and the Vistadome (seven per day). The Vistadome service has particularly large windows giving you more Sacred Valley views.
Bear in mind that the train services are largely morning services to enable travelers to get to Machu Picchu and spend the day there. Few people do this journey just to spend time in Aguas Calientes. For more on train journeys in Peru, see this article.
By Taxi and On Foot via the Inca Trail
Duration: 4.5 days
Taxis run throughout the day from Ollantaytambo to Km 82, the official start of the Inca Trail, from where it's a typical four-day hike to Machu Picchu, seeing Machu Picchu on the fourth morning and then reaching Aguas Calientes on the afternoon of day four by bus or by foot from Machu Picchu. This option has to be arranged many months in advance, as the Inca Trail is a very popular hike. Check out this 5-day Inca Trail itinerary for more information.