score:5
The train takes you to Aguas Calientes town, which is at the bottom of the hill on which Machu Picchu sits. From Aguas Calientes, you will need to get hold of:
Per this guide, it's possible to get the guide reasonably easily when you get to the site entrance. Per the same site and this one, you can get bus tickets and entrance tickets in advance - the entrance you can do online but the bus tickets may have to wait until you arrive in Cusco or Aguas Calientes.
Taking the train to Aguas Calientes and then trying to book a tour there will probably be probably not much simpler than just sorting it out yourself. Most people will have either booked a tour in Cusco or will do the whole thing independently. My (2007) Lonely Planet does not list any tour operators based in Aguas Calientes.
One of the advantages of getting a tour is Cusco is the fact that they mostly put you on the train at Ollantaytambo, not Cusco. This is significantly quicker (the switchbacks on the railway line outside Cusco are slow) and the rail service from Ollantaytambo is much more frequent.