Though some people find it very difficult to lose weight, there are people that find it just as hard to put any on. A combination of super fast metabolisms, bad eating habits and wrong approaches to exercise are all factors that cause this problem.
Don't Worry About Genetics
The reason why a lot of guys have trouble gaining weight is because their metabolism burns so much energy. Think of this as a blessing, not a curse, and since you can't do anything about it, don't spend too much time agonizing over what could be. You have to work with what you have and complaining about your metabolism isn't going to help you gain muscle.
The number one rule of gaining weight is to eat enough. Only when you take in more calories than you burn (creating a calorie surplus) will your body begin to gain mass. First you need to find out how many calories your body is burning each day. You can use the calorie calculator for an estimate. Next you need to find a way to increase your daily calorie intake over your daily calorie needs every single day, even days you don't workout.
Most skinny guys think they're taking in a lot more calories than they actually are. If you're not gaining weight the simple fact is that you're not eating enough. Try counting your calories for a week and see how much you're actually eating. Carefully monitor your weight by weighing yourself everyday at the same time. If by the end of the week you're still not gaining any weight, increase your intake by 500 calories per day. Repeat this step until you start seeing your weight increase.
Trying to gain weight shouldn't be a blank check to eat an unlimited amount of whatever you want. Gaining weight is about increasing your calories of nutritious foods to put on weight in a healthy manner. If you want to get fat, eat hamburgers, hot dogs and pizza all day long. Doing so will definitely get those pounds up.
Your carbohydrates should come mainly from complex sources such as 100% whole wheats, oatmeal, fruits and vegetables. Avoid refined flours and simple sugars though having sugars before, during and after exercise can be beneficial to your workout.
Your protein intake should come from as many complete sources as possible. Proteins are made up of amino acids. Some amino acids the body can make and others it can't. We need to get the ones we can't produce from the foods we eat. The amino acids the body can't make are called essential amino acids. If a protein contains all the essential amino acids, it's called a complete protein.
Your body can only use complete proteins to build new tissue. If you're not taking in all the essential amino acids (over the coarse an entire day, not necessarily meal by meal) your body won't be able to repair muscle damage and you won't get any stronger. Complete proteins are mainly found in animal sources such as meat, dairy, fish, eggs and supplements. Combining more than one non meat source of protein can also give you a complete protein (ex: peanut butter sandwich, rice and beans).
When increasing your protein intake, your fat intake might also go up. Fats are not all unhealthy. Saturated and trans fats are the kind you should stay away from but unsaturated fats can be healthy. Unfortunately, the same foods that are high in complete proteins are also high in saturated fats. Try getting your protein from lean meats such as low fat dairy, whey & casein protein powders, chicken, fish and even some cuts of beef.
Gaining weight is also about working out properly. If you just eat a lot without exercising, even if it's strictly healthy foods, you'll just get fat. Since you're a skinny guy with a fast metabolism, you want to make sure you're not working out too much. Exercise can speed up your metabolism which will keep you from gaining weight or even cause you to lose some.
Since you're having a hard time gaining weight, it's a good idea to cut down on your cardio until you start gaining weight. Cardio burns a lot of calories so limiting that form of exercise will help out your calorie surplus. Limit cardio to 3x per week at around 20 minutes per session.
Weightlifting is the main form of exercise that will help you gain muscle. When you exercise, you create tiny tears in your muscle which eventually gets repaired (assuming you're eating properly). The repair and recovery process is what makes you bigger which is why proper rest is important. Don't workout the same muscle more than once in a 72 hour period or if it's still sore.
The only way you're going to cause your body to make you stronger is if you push yourself during each workout. Find the right weight and amount of repetitions that will challenge you. Don't just count up to a random number. Try and go to failure in as many sets as you can.
You can either do a full body (3x per week) or a split (4-5x per week) routine. A full body routine will hit every muscle group in your body each time you workout while a split routine will target one or two muscle groups each session. Full body vs split routine.
The Bottom Line
If you're eating enough and working out properly, the weight will increase. If your weight isn't going up, the problem is that you're not eating enough. Keep track of your calorie intake and weight and make your adjustments accordingly.