Hi there,
By gaining weight, I assume you're referring to bulking out a bit by increasing your muscle mass, rather than gaining body fat?
For this you'll need to focus on 4 main things:
1). Eat more complex carbs such as pasta, wholemeal bread, rice, oats etc. Your aim is to consume more calories than your expending. Try eating 6 smaller meals per day rather than 1 or 2 larger meals.
2). Increase your protein intake. Lean meats, fish, and possibly think about protein supplementation such as protein shakes.
3). Start going to the gym and lifting weights.
4). Get plenty of rest and recovery!
Tom