Go to the Machu Picchu forum and there is a recent posting with over 100 replies about this topic and where to buy and how - it is not only about Cusco City. (By the the gov't website only appears to work in Spanish)
I personally purchased on the gov't website in the Spanish version using a Chase mastercard (some say citibank didn't work) when I didn't understand something I copied and pasted the spanish into a translator in a new tab. People have also reported the website working better in Google Chrome browser for some reason (I think that is what I used).
I don't think you can buy bus tickets in advance. I asked my hotel in Aguas Calientes but they haven't responded yet.
I am not sure if there is a detailed explanation on how to use the gov't website.