To gain mass quickly, focus on the big compound movements

Squats, deadlifts and bench presses are widely considered to be the best exercises for developing overall body mass. Squats and deadlifts will help strengthen your lower body, while bench presses will help you develop a large chest and shoulders.

For example, a typical mass gain workout for the legs would be squats followed by leg presses, leg extensions, leg curls and weighted calf raises. To gain chest mass, you’ll want to begin with the barbell or dumbbell bench press, which can be followed by dumbbell flyes, the pec deck machine, or cable flyes.
Lift as much as you can while maintaining good form

The key to gaining mass consistently is progressive overload – gradually increasing the weight over time while still performing each exercise with a full range of motion.

Before you start lifting heavy, however, it’s important to learn how to gain muscle mass with good form – so start with a lighter weight so you can learn how to perform each movement correctly. You might want to consider filming yourself with your smartphone (or getting a friend to film you) so you can look back on the video and evaluate your technique.
Eat more protein

Many personal trainers and fitness enthusiasts will recommend at least 1 kilogram of protein per lean pound of body weight for a mass gaining diet. Therefore, if you weigh 160 pounds and you have 20% body fat, your lean body mass is 128 pounds – so you’ll need to consume at least 128 grams of protein each day. Lean proteins such as chicken breast, tuna, natural yoghurt (low fat version), and whey protein are excellent mass gaining foods, as long as you’re eating enough calories.
Get plenty of sleep

Aim for about 7 to 9 hours of sleep each night to maximise your recovery. The US Sleep Foundation advises around 7 to 9 hours of sleep for people aged 18 to 64, and 7 to 8 hours of sleep for adults aged 65 and above. It also recommends that people stick to a consistent sleeping schedule - including weekends - and that they should avoid alcohol or caffeine before bed.
Meet your nutritional requirements

Eat at least five servings of different fruits and vegetables each day to get enough vitamins and minerals in your diet. Eating plenty of fruit, veg and high-fibre foods can help you maintain a healthy immune system and high energy levels - both of which are essential for maximising your performance in the gym and subsequent muscle recovery.
Amend your workout every so often to ‘trick’ your muscles

Over time, your muscles get better at performing the same exercise as they adapt to the physical stress. This is why many gym goers will notice they hit a ‘plateau’ after sticking with the same workout regime over a long period.
Last but not least - don’t overtrain!

It’s tempting to go to the gym every day in the hope that you’ll gain mass faster – but this is counterproductive. Working muscles that are still recovering from the previous workout will make it much harder to increase your strength levels and gain muscle mass fast. As long as you train hard, get plenty of rest, and have a good diet, you should be able to increase your strength quickly and consistently as a beginner.