Building muscle will mean you will 'gain' weight. If you want to substantially gain muscle mass, you will need sufficient nutrients during your workouts and during recovery. Importantly, consume plenty of carbs before and during your workout and extra proteine post workout. You will need to do heavy reps in short sets, giving each muscle group at least two days of rest between workout. Doing so you will gain muscle mass and likely slightly gain some fat mass, overall you will get heavier, but as your muscles gain more than your fat, your body composition would still be leaner. You might be able to tune your diet in such a way that you don't gain any fat mass or even have a slight decrease in fat mass, but however you turn it, if you want good muscle building results, you will need to accept an overall gain in total weight. This should not be a real concern though, when you look in the mirror you will look leaner, when you use a measuring tape, your waist will get leaner, your weight should not concern you really when you are out to build muscles.
If in contrast your first concern is to loose fat, as it might be if you happen to have health issue, or just want to look ripped when your on the beach, than you need to abandon rapid muscle increase goals. You should do lots of cardio, drasticaly limit your carb intake to almost zero, do long sets of relatively light reps, etc. You will be loosing your fat mass relatively quickly, and if you tune your diet and training program carefully you may manage to do so without loosing muscle mass.
I've tried to find some kind of middle road, but it doesn't seem to give half the result of what I'm about to suggest:
- Start off with 18 months 'strength first', get some real strength into those muscles, gain muscle mass, gain some weight in the process but try to find the balance as to at least not gain any more fat mass. Keep your far-mass gain in check. If you are gaining less than 1kg of body fat for every 5kg of FFBM increase than you're doing fine.
- Go on the ripping program for 6 months. Keep your FFBM in check. If you're loosing less than 1 kg of FFBM for every 4 kg of body weight your doing fine.
- Determine the goal for your FFBM and your fat percentage. Go on a muscle building program until your FFBM has overshot your ideal FFBM by about 5%.
- Go back on the ripping program until your FFBM drops below the desired value, than continue at 3.
And as for nutrition, as Barin suggests, 1g proteins per pound of body mass is a good starting point. His suggestion for carb versus fat is really of though. I would suggest the following during your muscle building periods:
- 1 gram of protein per pound
- 1.5 gram of carbs per pound
- for the rest of your calories: fat
During your ripping phase, cut your carbs even further:
- 1 gram of protein per pound
- 0.5 gram of carbs per pound
- for the rest of your calories: fat