Have you tried to ask some of your friends how to gain weight fast? Well, if you did so I am quite sure that you got a surprised response, right? They will think that you are drunk or something like that. Many people may accept to hear the other question "How to lose weight?" but not to gain weight.
Others will give you a very simple answer to your question which simply to eat more. This may be way better that those who don't get the question and may be you already thought of this answer. Eating more than you burn is the first thing that you should do to gain weight. But I don't think that you want to put on fat then hate yourself and try to lose it again. This increase in your weight should be in the muscle not fat. So only eating more than you burn is not enough, you need to follow regular weight training plan to build your muscles and avoid increasing fat stores in your body which is something that you really don't want to happen.
First thing to do is to know how many calories you consume a day. Simply calculate the calories you consume daily for a week. Now you can eat more than what you are used to. Consume about 300-400 calories more than what you have calculate in the previous week. Remember that it is not only about eating more but you should pay attention to the type of foods you eat and you weight training program.
Still eating junk food? If yes, this should be the first thing to avoid if you want to get results. Your diet should contain 20-50% carbs. , 30-40% protein and 20-40% fat. Play with these ratios till you get the best results as it is different from one to the other.
The other very important thing that should be a main part in your plan is weight training. I am not talking about any exercises here, not talking about cardio exercises, abs exercises or any other exercises other than weight lifting. The more weight you use the more muscle fibers you will work in your muscle the more muscle you will gain. You should be able to do about 6-12 reps per set, don't use light weights to make more reps thinking that it will gain you more weight.
Rest is a very important thing to get results out of weight training. Train for one hour 2 or 3 times a week and this should be enough. Go easy on yourself or you will harm your muscles, give time to recover and grow.