Eat plenty of protein and carbs. Only good carbs though. Also, if you need to gain weight, try "Mass Gainer" and "Cyto Gainer". They are used by athletes and others who have trouble putting on weight. Just remember that drinking this alone will only make you fat, so you'd need to do some sort of weight-lifring or exercise to actually make it work.
Protein and carbs are great ways to gain healthy weight. You can also do weight trainig and lifting weights and gain muscle weight.
Keep in mind though that if you just eat protein and carbs without doing weight training you will most likely just put on fat.