It's trickier than it sounds. Especially if you want to do it the healthy way. I recommend eating six times per day and eating about every three hours. The most important thing you can do to gain weight is to eat more calories than your body needs.
Eat Lots of Protein. High-protein foods include meats, fish, eggs, many dairy products, legumes, nuts and others.
Using plenty of spices, sauces and condiments can help with this. The tastier your food is, the easier it is to eat a lot of it.
Here are some energy-dense foods that are perfect for gaining weight:
1) Nuts: Almonds, walnuts, macadamia nuts, peanuts, etc.
2) Dried fruit: Raisins, dates, prunes and others.
3) High-fat dairy: Whole milk, full-fat yogurt, cheese, cream.
4) Fats and Oils: Extra virgin olive oil and avocado oil.
5) Grains: Whole grains like oats and brown rice.
6) Meat: Chicken, beef, pork, lamb, etc. Choose fattier cuts.
7) Tubers: Potatoes, sweet potatoes and yams.
8) Dark chocolate, avocados, peanut butter, coconut milk, granola, trail mixes.