Can differ but definately before and after. Complex carbs with protein about 1 hour before the gym. Fast carbs with high protein after you train. Carbs levels vary with goals but 50grams is a nice amount each time. Then around 1 hour after your post workout shake/meal you want to have a large meal consisting of protein, good carbs and good fats. Remember pre and post workout are your most important meals of the day.
Side note some find consuming food before a workout knocks down their energy too much. That is simply due to the energy it takes to digest food... plus they may feel bloated etc. They are likely consuming too much food before they train or eating it too close to training time. Adjust accordingly to suit your body. Even 20gs of carbs with some protein is great before a workout.