The train from Cusco to Machu Picchu actually runs to Aguas Calientes. Machu Picchu lies uphill and you will have to take the bus from here. Most Hotels are located here, but there is also one at the entrance to Machu Picchu.