A guided visit that leaves from the town
If you already sleep in Aguas Calientes, there is an excursion that starts there. According to the listing it lasts 4 hrs 15 min and includes the transfer to the site, the Machu Picchu entry ticket and a guided visit. The train from Cusco is not included and is booked separately, so confirm your arrival ticket first.
The bus, only if you need it
Between the town and the citadel there is a round-trip bus of 30 minutes, according to the listing. It does not include the citadel entry ticket. If you are looking for schedules or have questions about the ride, the Aguas Calientes bus page covers it in depth, with everything worth checking.
How to split your time
If you arrive by train the day before, use the afternoon to sort out your ticket and transfer and keep the morning free. If you go down after the visit, work out your return train time before giving time to anything else. Every plan is set by your train time, and it pays to leave a margin so you are not rushing. Before leaving the hotel, also check the meeting point of your visit, the exact time and which documents you need to have at hand.
If you want to stay the night
Sleeping in the town lets you start the visit early. The Machu Picchu in 2 days page compares that option with the one-day excursion from Cusco, and the train page explains how to reach Aguas Calientes and what is worth booking in advance.

