Cusco might be perceived as the gateway to the Sacred Valley, but Urubamba is even more so, guarding the road to Ollantaytambo, Aguas Calientes, and Machu Picchu. It's a town that you will inevitably need to pass through and serves as a convenient base for many activities such as horse riding, mountain-bike riding, and visiting the Inca ruins at Moray.
Traveling the approximately 680 miles (1,100 km) to Urubamba from Lima (or indeed, most places) is almost always done via Cusco. There is a road (Hwy 111) branching off from the main Pisco-Cusco or Nazca-Cusco roads that you could take to avoid Cusco and reach Urubamba slightly quicker, but after such a long journey to get there from Lima it is precious few travelers who would want to avoid Cusco for this reason.
Travel to Urubamba is via plane, bus or private transfer. Make transfers between transport hubs in Cusco by taxi.
By Plane and Private Transfer
Duration: 3-4 hours
By far the easiest option is to fly most of the way from Lima to Cusco's Alejandro Velasco Astete International Airport, leaving just a one to two-hour overland trip the other end. Direct flying time is 80-90 minutes. Most of Peru's domestic airlines and several international carriers ply the Lima-Cusco route, which is Peru's most popular. LATAM offers the greatest choice of flights, while other airlines flying include Avianca, Sky Airline Perú and Peruvian.
Direct flights are about hourly between 5 am and 7 pm. Remember that many international flights arrive into Lima in the evening, and that there may not be time to transfer to a flight to Cusco on the day you arrive. This will mean staying in Lima overnight. See here for how best to spend 24 hours in Lima.
Organizing a private transfer from Cusco to Urubamba and other Sacred Valley sights, for a day or even several days, is quite common. It is also very convenient, as there is plenty to see (and public transport options are not always perfect). The route from the airport in Cusco to Urubamba via Chinchero is quickest, and can be done in an hour. Via Pisac, the journey is longer and closer to two hours.
By Plane and Bus
Duration: 3-4 hours
The journey from Lima to Cusco by plane is the same for this option as above. Once in Cusco, there are two minibus routes to Urubamba, each departing from a different location about a ten-minute drive from the airport. At Puente Grau at the intersection of Av Miguel Grau and Av del Ejército, minibuses leave via Chinchero for Urubamba, the fastest route (one hour). At Puputi close to the intersection with Juan Santos minibuses leave for the longer journey to Urubamba via Pisac (1.5 to two hours).
The journey is popular despite being longer as many travelers want to stop at Pisac first. Departures on both routes are at least hourly throughout daylight hours, but have no fixed schedule because they like to get as many passengers as possible before leaving.
By Private Transfer or Bus on the 'Gringo' Route via Nazca
Duration: 20-24 hours nonstop
This is another very popular way of doing the Lima-Cusco journey, although it is most common to break the journey in Pisco, Nazca, or both along the way. It is often referred to as the 'Gringo Route' because of its popularity with backpackers. Traveling overland, you realize just what an immense country Peru is—with the bad roads making it seem bigger still.
The best-quality road is Highway 1s south to Nazca, then Highway 30 to Abancay and Highway 3S to Cusco. In Cusco, travel by bus or private transfer to Urubamba as detailed above.
The point of doing the journey this way is of course not to do so in the quickest way, but to do it the cheapest way and/or to see something of the country. Few tourists, whether going by bus or by private transfer, do the journey in one hit. Whether you stop off in Pisco or Nazca or both, allow two nights in each to factor in side-trips to the main sights.
By Private Transfer or Bus on the Central Highlands Route via Huancayo
Duration: 25.5-32 hours nonstop
This might be the least popular way of doing the journey from Lima to Cusco, because it goes through the traditional heartland of the Peruvian Andes and creature comforts are fewer. All things considered, you will likely spend significantly more on this overland journey than the previous, but you will likely get some magical insights into Peruvian life that are not otherwise possible.
Coming this way, the first leg of the journey is to Huancayo (six/eight hours by private transfer/bus). The second leg is to Ayacucho (six/eight hours by private transfer/bus). The third leg is to Andahuaylas (five hours) where you normally change for the final leg from to Cusco (seven/nine hours by private transfer/bus). With the poorer roads and poorer buses in the Central Highlands, it is quite common to do one or more than one leg of this journey by colectivo, a shared taxi that departs when it has secured four passengers.
Of course, as with the previous overland option, the point of journeying this way is to see something of the country, rather than travel non-stop, with Huancayo, Ayacucho, and Andahuaylas the main overnight stops as well as, of course, Cusco. Allow two nights in Huancayo or Ayacucho; one in Andahuaylas.In Cusco, travel by bus or private transfer to Urubamba as detailed above.