From the figure you may get a rough idea of the Inca trail. On the right is Cusco. To reach Machu Picchu you have to go to west from Cusco. You can take train ( red line) from Cusco and reach Machu Picchu in three and half hours. Then take a bus ride ( black line) to Machu Picchu ( 20 minutes).
If you choose four day classic Inca trail, you have to start at KM 82 or KM 88. This KM thing is actually the distance indication of train truck .(so KM 88 is 6 miles away from KM 82.) Then you walk four days ( see the blue line, you have to walk through that line) and reach Machu Picchu. After you reach Machu Picchu you would go to Aguas Calientes city through Bus and to Cusco by train.
You may choose 2 days Inca trail. In this case you will start from Cusco by train and stop at KM 104. Then reach original Inca trail at Winay wayna ( look at the figure , the yellow line). Then go to Machu Picchu and come back to Cusco, through same way as four days trail.
I hope this will give you a fair idea on the Machu Picchu and Inca trail direction.