There are 3 main ways to get to Machu Picchu. The first one and most popular is getting by train. You can take the train from Cusco city to Aguas Calientes, the based town of Machu Picchu or if you have been doing some tours in the Sacred Valley, take it from the Ollantaytambo train station.
The second most popular way is by doing the 4 day Inka Trail trek to achu Picchu. This is a moderate hike across the Andes passing by numerous archiological sites before arriving to Machu Picchu.
The third option is doing the 4 days Salkantay Trek. This is a less crouded tour. After 4 days of hike we arrive by train or walking to Aguas Calientes and on the next day take the shuttle to the citadel.