Weight gainers are packed with high calories, protein, carbs and other nutrients. They are an easy way to consume huge amounts of quality calories.
In order to gain weight, one has to consume additional calories on top of what you burn regularly. Essentially, increasing your calorie intake = weight gain. Best to take 1/2 serving of mass gainer after each meal to see fast results. The quality of mass gainer will affect weight gain vs muscle mass.