There are a few options for getting to Machu Picchu. For adventurist folks, there's the Inca trail, although if you want to do this you need to book well in advance. Like, months. You can also take the train from Cusco. You can stay overnight in Aguas Calientes, or you can just come down in the morning. Staying overnight means you're out there earlier, when there are fewer people... and that's so much nicer (in my opinion).
Going to Machu Picchu
dania added
There are several alternatives to the inca trail for those who do not want to pay the amount of the inca trail. Choquequiroe, Salkantay and several others offer a few days of trekking all the way to Machu Picchu and include meals, accomodation, porters tickets etc. I did Salkantay for 5 days, it was AMAZING and cost like 140$ for being a student. definitely check it out in Cusco

