By public transportation
To get to Machu Picchu by public transportation, you must first go to Santiago bus terminal. This is about a 20 minute walk from downtown Cusco. From there, you can get a bus for 15 soles to Santa Maria. This journey is approximately 4 hours. It is important that you get this bus as early as possible (first bus of the day) as it takes a full day to get to Agua Calientes, the town at the base of Machu Picchu.
When you arrive at Santa Maria, look for a collectivo headed for Hydro Electrica. This should cost around 10 soles per person and take around 2 hours. They collectivo wont go until it is full. An issue is that you might struggle to find a collectivo going all the way to Hydroelectrica and just to the town before of Santa Teresa. If you need to walk between these towns it takes around 2 hours.
From Hydroelectruca, it is a 2 hour walk next to the train line to reach Agua Calientes. Don’t worry this walk isn’t half as dangerous as it sounds. Trains only run this route a few times a day and go very very slowly due to the very large number of tourists walking. They also make a very loud honking noise to let you know they are coming.
This journey will take a full day and you will need to stay the night at Agua Calientes before venturing to Machu Picchu the next day. The next day from Agua Calientes you can either complete a steep uphill 1.5 hour hike to reach Machu Picchu or catch a bus which costs $12 USD one way.
By transfer (bus)
You can get a transfer from your hotel directly to Hydro Electrica with any tour agency in the city centre. They all sell this transfer at different rates. We negotiated 55 soles pp round trip. We would recommend this option as it only costs 5 soles more per person and you do not have to change transport at the town of Santa Maria. We found a company which was also flexible with our return date. We just needed to contact them the day before we wanted to leave. You need to negotiate your terms with the company.
The transfer still requires you to complete a 2 hour walk from Hydro Electrica to Agua Calientes. There is an option of getting a tourist train for this leg for 30 USD pp one way (the same train that costs locals 5 soles) but most people chose to walk. If you have bags, it is an extra 10 soles per bag.
As with the above option, the next day from Agua Calientes you can either complete a steep uphill 1.5 hour hike to reach Machu Picchu or catch a bus which costs $12 USD one way.
The train is the most expensive option but is also the most convenient if you have unlimited funds. You don’t have to complete the 2 hour walk from Hydro Electrica to Agua Calientes if you take the train however, you do need to make your way from Cusco to Ollantaytambo as the train departs from there. To get a collectivo/transfer to Ollantaytambo, it will cost up to 15 soles per person. We saw two companies that run this route Peru rail and Inca rail and the price ranged from $50 to $100 each way per person depending on the time of day you travel.