When you work out, your body uses up its stores of energy and nutrients, especially when you have been doing heavy muscle work. The first 60 minutes or so directly after you are finished with your workout are absolutely critical to proper muscle building and overall body recovery. It is at this time that your glycogen levels are down, and your body is in a state where any glucose it comes across will be immediately rushed to those muscles to replace what you have used up. If you do not get enough carbs, protein and sugar during this period, your body might start to cannibalize the very muscles you were working so hard to try to build by converting muscle tissue into glycogen.
It is also critical that you re hydrate to replace all the fluids you sweated off over the course of your workout remember, lost water weight does not actually make you any healthier, only thirstier, and your body needs that water to run properly. A good rule of thumb to figure out how much you need to be drinking afterwards is to always weigh your self both before and after your workout sessions, and for every pound of water weight you lose, drink about 20 to 24 ounces of water.
So with those points properly belabored, on to the details. There are three most important types of foods you should get into your body as soon as possible after a work out. Some people bring protein shakes with them to the gym so they can slam them back as soon as they drop the barbells, but really as long as you get this stuff into yourself with a 10 to 40 minute window or so you should be fine. (Remember, your body also needs time to digest and process the nutrients once they are in you.)
The first type of food you will need to consume are carbohydrates. I know, I know. Carbs are the devil when it comes to weight loss. Well, actually no, in fact they are a great source of ready energy and great for replacing everything you just worked off. If you want to get away with eating more pasta guilt free, spend more time working out. Carbs are quick to digest and are vital for replacing lost stores of glycogen after your workout. In fact, the ACSM (American College of Sports Medicine) recommends you get at least 50 and up to 100 grams of carbs after every workout for best results.
Protein is also an important component of any post workout meal. Lean protein is best, for example tuna, turkey or chicken breast, as well as the stuff found in protein shakes. Remember, the main thing you are doing over the course of a work out is breaking down your own muscle tissue so your body has to rebuild it better and stronger. Consuming protein immediately after a workout helps your body to rebuild that damaged tissue with the best materials available.
Potassium is critical for maintaining energy levels and generally keeping your body in good working order. Unfortunately, you also sweat a lot of it out when you work out, so eating potassium right stuff like bananas, raisins or potatoes can help a lot.