To gain weight you have to eat more calories than you burn. Start off by estimating how many calories you burn each day using the daily calorie needs calculator To gain 1 pound per week, eat 500 calories more than you're burning. To gain 2 pounds per week, double it and eat 1,000 calories more than you're burning everyday. To gain muscle, in addition to eating more you also have to stimulate them with enough through resistance training that when they recover, they'll get bigger and stronger. To get an efficient workout you might want to join a gym if you aren't already a member.
Hope this will help you!!