Your schedule for Machu Picchu depends on what time you want to get there. Looks like there aren't many trains that go from/to Urubamba so that's limiting, unless you want to go to/from Ollantaytambo by car.
As far as CUZ to Urubamba, either arrange a car (the hotel will probably charge around $50 or you can bargain with a driver in CUZ for around 40% less). The town in on the way to Ollantaytambo and sees a lot of car/taxi and mini/tour bus traffic.
Not certain how much you're into archeology but the sites require a combined site ticket (some degree of control on what is included and/or not depending on where you buy it). Lots to see between Cusco and the Sacred valley,and along the sacred valley.