The Inca Trail ends after its final descent from the notch in the horizon called Intipunku (Sun Gate). Looking at the hill behind you as you enter the ruins, you can see both the trail and Intipunku. This hill, called Machu Picchu (Old Peak), gives the site its name.
Access from the Machu Picchu ruins may be restricted. It takes about an hour to reach Intipunku. If you can spare at least a half-day for the round-trip, it may be possible to continue as far as Wiñay Wayna. Expect to pay S15 or more as an unofficial reduced-charge admission fee to the Inca Trail, and be sure to return before 3pm, which is when the checkpoint typically closes.