As a recap, resistance training is the stimulus for muscle growth. When you lift weights, you send a signal to the muscle to grow.
However, resistance training is only a part of the equation, albeit probably the most important part. At any point in time you are simultaneously building muscle and breaking it down. As we mentioned previously, when you're not doing anything (and you have not consumed any protein) muscle breakdown is higher than muscle synthesis (building muscle).
Brace yourselves for a graph. Here is a little explanation so it's less confusing. The bottom axis are the conditions:
Notice something, in the resistance exercise only section (red box), breakdown is higher than synthesis. That means that if you lift weights and don't eat anything - you're still losing muscle - just at a slower rate.
Also notice, look at how much higher that white bar is in the RE+AA condition than any of the other conditions.
Resistance training + Protein = Muscle
By eating foods high in protein, we feed the muscles exactly what they need to grow. For a quick and dirty list of high protein foods consider the following:
How much protein do I need?
These foods vary in how much protein they contain; a chicken breast may contain 30-40g of protein whereas 10 almonds contain 2.5g of protein.
The amount of protein you NEED for life and what is optimal for building muscle are very different. You may only need 0.4g of protein per lb of body weight to live but for optimal muscle building 0.6-1.0g per lb of body weight is recommended.
This means a 180lb male should be consuming 108-180g of protein every day (nearer 180 on training days and nearer 108 on non-training days. Remember, these are the recommendations for something trying to build muscle, not just to stay alive and healthy.
How much protein do I need before/after training?
A while ago, someone shouted from the rooftops that if you don't consume protein within 30 minutes of the end of your workout, your workout was wasted. Thankfully, I can tell you that's not the case (literally, they tested it and found it was bogus).
However, getting some protein in both before and after your workouts (within 2hrs each side) is probably a good idea. A safe bet is to consume 25-30g of protein both before and after your workout to make sure you're not leaving anything on the table. Conveniently, this is often the amount contained in a single scoop of protein powder.
Post-workout, I don't think it matters a ton if you get your protein from powder or whole foods - choose whichever fits your routine better. However, I would NOT recommend having a large meal right before a gym session. As a naive youth I once had IHOP before a gym session. I got halfway through my second set of bench presses before quitting because I was about to vomit.
Take home message
If you want to build muscle, protein is pretty important. In fact, if you don't have any you may be wasting your workouts. Think of each workout as a chance to signal muscle growth, you want to maximize the opportunity to build the most muscle possible. To maximize that signal, have 25-30g of protein before and after your workout. Also, aim to consume 0.6-1.0g of protein per lb of body weight over the course of each and every day.