To gain weight you need to consume more calories than you burn.
Do this in a healthy way. Do not choose excessive amounts of fast food or junk food. Make sure you are getting all the nutrients that you need. You should also do weight lifting or other types of muscle building activity which will help you build muscle mass
Answer assisted by Holly Barth, Medical Student