Need to. Know your height and weight to establish medical need to gain weight. Generally increasing calorie consumption and weight lifting will help.
More calories. In order to gain weight you must eat more calories. This is best done by increasing foods with high fat content like nuts and dairy. It would be a good idea to see a doctor first and make sure there are no problems like thyroid disease that may be keeping you from gaining weight. As you increase your calorie intake try not to eat a lot of junk or fast food. Eat healthy foods and exercise.