Really depends on your specific goals. Generally you need to be either gaining muscle or losing weight - you will struggle if you try to do both at once. To gain muscle you need to eat more than your daily caloric requirements with a focus on proteins To lose weight, you need to eat less than your daily caloric requirements.
Cardio is amazing for getting lean and fit, but won't help you bulk up at all. Sprinters are often told to never run 1k+ at more than a light jog, as you WILL burn muscle. Looking at the builds of different athletes will give you a good general idea of what that activity does to your body if done repeatedly. Distance runners are lean and fit, sprinters are muscled and fit - both are fit, but in very different ways.
If you're trying to bulk, you likely will gain fat as well. Most people deal with this my cycling their training/diet. When on a cut, make sure you don't starve yourself or eat less than 1200ish calories a day (this number varies a lot depending on your mass/musculature), or you will lose those gains you just added.
The biggest fail a lot of people deal with is trying to cut fat while gaining muscle. Long term, more muscle will help you burn a lot more fat, but you will find you struggle to gain muscle quickly if not eating enough.
If you're fat and weak now, I'd suggest a quick fat cut before focusing on gaining muscle, but again, your own goals are what really matters.
(post is archived)