Many people take the train from either Cusco or Ollantaytambo to Machu Picchu to the town of Aguas Callientes at the base of Machu Picchu and then the bus going up, while others take a bus all the way (much cheaper but quite a long journey) and of course then there are the treks - the most famous being the Inca Trek. While trains should be booked at least a month in advance, the treks need about a month and a half’s notice, or in the case of the Inca trek 3-5 month’s notice as they fill up fast. The Inca trek is 4 days long - and it is quite the hike - but fairly luxurious as you only carry your sleeping bag, and clothes and toiletries, and honestly if you want you can pay one of the porters to carry this for you. The porters carry the tents, sleeping pads, food, cookware, etc. They then set up all meal times, set up and pack tents, and so your only job is to walk / hike. Do you need to be physically fit to do the trail - yes - one is hiking at altitudes of up to 4100 meters where breathing can become harder, temperatures drop, and going up up up and down down down on slippery Inca stone stairs is not an easy task. During the rainy season the trek is harder as the stones become even more slippery. And yes people do get injured, pass out, and have even died on this trek - so make sure you’ve trained or are quite physically active. The Inca trek is very interesting as one passes many Inca ruins along the way to Machu Picchu and learns slowly about the histories of what happened and about Inca architecture and building skills.
Another popular trek is the Salkantay - which is a 5-day trek and goes through some glacial passes - this is also intensive - probably a bit more so than the Inca trek - but rather than seeing Inca ruins along the way, you will view magnificent scenery. How many hours are you hiking per day? - I would say probably between 4-8 hours a day - there are some breaks, but it is good to start when the sun is up and get to camp a bit before sun down as hiking in the dark with no lights on the path can be unnerving.
Because Machu Picchu is a world wonder and quite spectacular it is to be visited if going to Peru. But then so is Cusco and so are Pisaq and Ollantaytambo. If you have 3 days in the valley, make sure to see both Cusco and Machu Picchu, if you have 5 days - visit also, the Sacred Valley, and if you are lucky enough to have a week or longer - really soak it all in and take your time.
I mentioned above in the post about a town called Aguas Callientes at the base of Machu Picchu. This is the town that all taking a bus or train or coming back from a trek will stop in. 15 years ago, this town was quite poor and a bit of a dump really. It has now become a cute town nestled in the mountains, and rather like Banff in Alberta, Canada. There are hot springs, lots of cafes and restaurants, hotels and hostels, and the town has become very pretty. Worth a stay.
On a final note, the porters, these men come from small and often very poor villages dotted all over the Sacred Valley, and to be honest most of them are supporting larger families. They get paid about 50 dollars for 5 days work during which they carry super heavy loads - and really 50 dollars is not a lot when more and more goes less and less far in today’s world - yes even in Peru. The cook and guide are paid much more at 100-150 dollars a trek or more. And of course the agencies are paid very well. Please tip the porters fairly - for them this job is their livelihood, and a chance to escape and help their families escape what is often true poverty, as it is one of the few jobs requiring little education, and where spoken Spanish is not needed - for those coming from purely Quechuan speaking households.