Whether you are working out to build muscle, gain endurance or lose weight, you may not be able to replenish all the nutrients you lose during exercise with whole foods. In that case, you'll want to drink a protein shake so that you'll have enough energy to do normal tasks. When you drink a protein shake largely depends on when you're working out and what you're trying to accomplish.
What Kind and How Much
Technically, if you're working out, you should be drinking more milk and eating more fruit, but if that's not possible, make your protein shake a whey protein shake. Whey protein doesn't have fat or lactose, which will only work to slow you down. Your body will rapidly absorb whey protein and convert it to energy, so it's perfect either as a boost before your workout or to replenish after your workout. If you're an athlete, you'll want a four-to-one carbohydrate to protein ratio in your shake. If you're working out to lose weight, you'll want a one-to-one carbohydrate to protein ratio in your shake.
Before a Workout
If you work out first thing in the morning, you have the option of drinking your protein shake before your workout. Because you've just woken up, your body is low on energy and nutrients. You need to "break the fast" before you work out, or you'll run out of energy.
After a Workout
Most people will want to drink a protein shake after their workout. This is because there is a window of a few hours after a workout in which the muscles are primed to take in the protein and carbohydrates they lost during the workout. If you replenish them at that time, you will build more muscle. Even if you're losing weight, building more muscle should be your goal because muscle mass actually helps to burn fat, even when you're not working out.