When working out there are times when you want to bulk up and times when you will need to focus more on slimming down. This occurs because it is difficult to have "clean" muscle growth. Clean meaning muscle growth without putting on extra fat. That can be difficult to do if you are eating lots of protein and food need to fuel muscle growth.
I like to think of this as a pendulum. Slimming down on one side and bulking up on the other.
A little to the Weight Lifting Side: If you want to bulk up then you will need to do more weights than cardio. Cardio will burn the calories you need to build muscle. Likewise, the food you eat will be heavier in the bulk up stage than when you are in the slim down stages.
A little to the Slim Down Side: When you want to slim down you should eat very healthy with protein. Try and cut down on fatty foods and do a little more cardio than weights. You want to make sure you are sill eating healthy as you will need to ensure you don't burn your muscle at the same time.