To put it very very simply. If your muscles are under stress (e.g resistance training) and you are eating a well balanced diet (enough protein, carbohydrates, vegetables etc). They will grow.
It pains me to actually explain anymore than what I've just said as many, many people over complicate their training and neglect their diet. It really is as simple as I've just said but here you go anyway.
If you want to increase your muscle mass in the most effective way you need to follow a regimented resistance training plan for 10-12 weeks. Less than this and the gains you make will be negligible, more than this and you're body will become used to the strain its being put under and begin to plateau.
Now i'm going to say something that may make you think, eh? What? You're crazy? But here it is, nonetheless. If you want bigger biceps, you need to train your legs. What the hell? Why? My biceps have nothing to do with my legs! I know, I know. Hear me out.
The muscles in your legs are the biggest, strongest and most influential in your body. If you think that by neglecting them you can get the most out of your ability to adapt you are sadly mistaken. Putting the majority of your muscles under tension over a sustained period of time will produce the best results (this doesn't mean that you neglect recovery). It will cause your body to produce more growth hormone naturally, will increase your need for nutrition and help your CNS (central nervous system) to improve thus providing you with muscle mass.
Weight training can be compared very easily to a sport. If you want to be good at a sport, football for example - you never just train one area of your game. If you train all areas of your game, the one area that you intended to focus on will improve anyway. If you spent 6 days a week working on ball control, then yes you'd be great on the ball but you'd have no pace, no stamina, you wouldn't be able to read the game, pick out passes, tackle etc. If you work on everything, you will get results.
Okay enough waffle, let's get some tried and tested methods out.
First of all, I'm not making these workouts up. They've been around for many years and are written by respected professionals in the weight lifting field. I cannot recommend them enough. If you are a beginner in resistance training, these are ideal. If you're quite experienced but not getting the gains in muscle mass you want, these are ideal. If you're an elite, what are you doing on here?
The key thing about these workouts is that they focus on compound lifts (exercises that use mutiple muscles), this means that every repetition is forcing a large portion of your body to work rather than spending 10 minutes curling a tin of beans in your living room.
The first and most popular of these compound workouts is written by Mark Rippetoe, called Starting Strength. Shown below:
3x5 Bench Press
5x3 Power Cleans
On first impressions, it doesn't look like a lot of volume. But if you are doing these compound lifts with a heavy weight they take a lot out of you. Try it, if you don't believe me.
On the link above are mutiple variations of this workout, but if it works don't mess with it.
In order to gain weight, you need to have a higher calorific intake than calorific expenditure (you need to eat more than you burn). Your body uses energy even at rest in order to maintain temperate, think, move, breath etc. Everything requires energy. The daily amount of energy used at rest is classed as your Basal Metabolic Rate (BMR).
There are many formulae out there that calculate your estimated BMR. The most famous of which is the Harris-Benedict forumla which uses your height, weight, age and sex to determine how much energy you burn at rest.
Male BMR: 66 + (13.7 x weight in kilograms) + (5 x height in centimetres) - (6.8 x age in years).
Female BMR: 655 + (9.6 x weight in kilograms) + (1.8 x height in centimetres) - (4.7 x age in years)
For example. You're a 23 year old female who's 5ft6 (167.6cm) and 130lbs (58.9kg).
655 + (9.6 x 58.9) + (1.8 x 167.6) - (4.7 x 23) = 1414kcal
This is how much energy you would burn if you were in bed all day. Obviously most of us don't spend all our time in bed, so we need an "activity mutiplier" to work out what we burn on our average day. These are split into categories below:
Little or no exercise - BMR x 1.2
Light exercise 1-3 days a week - BMR x 1.375
Moderate exercise 3-5 days a week - BMR x 1.55
Hard exercise 6-7 days a week - BMR x 1.725
Extreme exercise daily training - BMR x 1.9
If we continue with our example, our 23 year old girl fits into the light exercise category.
Therefore we take 1414kcal (BMR) x 1.375 = 1944kcal This is how much energy she burns on average per day with her daily lifestyle/routine. In order for her to gain weight she needs to eat more than 1944kcal everyday. Most experts reccomend a surplus of 300-500kcal a day depending how much you want to gain and in what time limit.
The Diet Basics
If you're trying to gain weight fast, workout your BMR (including activity) and eat well over that everyday. Make sure you're eating a large amount of protein and carbohydrates but don't neglect fruits and vegetables you need vitamins and minerals just as much.
It's generally suggested that smaller, regular meals every 2.5-3 hours from 9am until you go to sleep is the most effective way to keep your body anabolic and provide it with everything it needs to grow from the training schedule you're putting it under.
Some people suggested that for extreme weight gain you should try GOMAD (Gallon of milk a day). A gallon of milk on average contains 2400kcal, if you're eating 5-6 times a day (every 3 hours) and drinking a gallon of milk you'll be having around 5000kcal a day. Some people have gained much as 30lbs in a month.
The main thing about weight gain, is that you need to eat a lot and train regularly. Don't worry about the excess fat you might get on your stomach. Once you've hit that muscle size and weight you want, you can increase the amount of cardio and get that "toned/ripped" look you've always dreamed of.