There are two critical points: 1) immediately after waking up, and 2) post workout
Other than that, just make sure you have a steady flow of protein coming in throughout the day. There should be a bit of proteins in every meal.
If you're talking about weight-lifting, though, what I would do immediately after that is get some carbs in, because your muscles have just been emptied of their glycogen. So I would eat a banana and have some oatmeal or something like that immediately after the work-out. Then I would have my protein within an hour after the workout.
As for cardio, it's a little bit different. After cardio, you should drink your protein immediately (within 15 minutes after the cardio) and hold off the carbs for about an hour. The reason for it is that your insulin-sensitivity is super high after cardio, meaning that your insulin could easily spike if you have carbs immediately after cardio. When that happens, your body will shut down the fat-burning mode severely and instead use the carbs you just injested as fuel.