Few would go to Machu Picchu without making a stop at Cusco. The city of Cusco is about 3,500 m above sea-level (roughly 2 miles), so experiencing some level of high-altitude sickness is inevitable when first arrive. If you are a healthy adult, then just slower your pace and don't run, drink (alcohol), or smoke (if you do smoke) excessively the first few hours, and you should be Ok.
Due to its popularity, it is a good idea to reserve your Cusco - Machu Picchu round-trip train ticket over the internet prior leaving for Peru unless you stay in the country for an extended period of time and are very flexible with dates. If you prebook tickets online, upon arrival you have to claim your actual train tickets at Cusco ticket office but not at the train station. I was lucky enough that the staff of my hostel saw my ticket claim. Because I arrived on a late Sunday morning, they warned me that I had to go the ticket office immediately to claim my train tickets since it would be closed in the afternoon, and my train was leaving on the next day. If I had headed to the train station instead, I probably would miss the ticket office hour and couldn't make it to Machu Picchu.
After waiting for over one hour at a pretty nice and modern ticket office, my number was finally called. I thought that would be the last hurdle, and I would be on my way to Machu Picchu the next day...Yay! Not so fast, according to the ticket agent, there wasn't any train from Cusco to Machu Picchu anymore. The actual train would depart from Poroy, and I had to take a connection bus (arranged by PeruRail) from Cusco train station to Poroy train station early in the morning. Nevertheless, I had my train tickets...Yay! Oh, don't forget to bring your passport when claiming your tickets.
Because I'd read some not too nice reviews about Cusco before going there, I only booked to stay for 1 day. Big mistake! As all other cities, it has shady areas that you don't want to be in. However, I think the city in general is definitely charming with wonderful people and worth a longer stay. The historic old town is fantastic and pretty safe to roam around. You can find rows and rows of street vendors selling everything, or you can wander a few blocks off the main streets and be off the crowds. Food is as good as it can get in Cusco. There are tons of local restaurants with US$3-5 dishes that taste like heaven. There are also many upscale restaurants with US$10-20 a menu item. One thing I can vow is that food in Peru is never disappointing, whether you go to a cheap local eatery or a high class restaurant. I had not a bad Peruvian meal.
Since you are 2 miles closer to the sun, winter days in Cusco are actually quite warm as the sun beating down on you. It is pleasant to walk around with a light jacket or just a long sleeve t-shirt. However, it is freezing at night, so bring a heavy coast. In fact, the temperature starts dropping drastically after 3-4pm in winter, so don't make yourself look like a stupid gringo (and I saw few) walking around Cusco at night in a pair of cargo shorts shivering. Talking about Cusco night, if you think it is pretty during the day, you probably will think it is pure magical at night around the huge old town square area. It is like a South American Krakow, bars [checked], fun [checked], people [checked], and charm [BIG CHECKED].
Cusco, a charm and a prelude to Machu Picchu, enjoy it!