Nutrition science has come a long way from the days of carb loading (eating a ton of pasta the night before a marathon). What you eat (and when) has a major effect on your workout. Eating after you exercise helps convert your body from a catabolic state (where you break down muscle tissue), to an anabolic state (where you build muscle tissue back up). What and when you eat are the key factors.
To replace energy stores and help repair damaged muscle (during training your muscles are broken down, and then rebuilt to become stronger) you need to eat within 30-45 minutes of your workout. This time period is crucial in helping you recover. Wait longer and you will not get the benefit.
As for what to eat, the newest research is showing you need a mix of carbohydrates and protein. Most sources indicate a ratio of 3-4 grams of carbohydrate to 1 gram of protein.
Carbohydrates should be a mix of simple and complex (such as fruits, vegetables and whole grains). Adding protein can help reduce muscle damage and speed repair. High quality proteins such as those from milk, chicken, fish, eggs and soy are recommended. Smoothies made with yogurt, pretzels and hummus or peanut butter, cereal fruit and milk are examples of a good post training snack.
Post exercise nutrition is especially important for those who work out frequently and hard. If your exercise is a 20 minute stroll, you do not have to worry about eating for recovery. Those who do high intensity interval training, lift weights or do long endurance activities need to make post exercise nutrition part of their training. Do not forget that these foods still count as calories so you may need to adjust the rest of your eating. Time and plan your nutrition and you will get much more out of your training.