Naturally is right, exercise will help if you build up muscle! When I joined the track team in high school I actually gained weight due to the muscle! (And we didn't even lift weights -- I just ran 3-5 miles a day, 6 days a week, often up and down hills! Yikes, I wish I did that now, I am such a bum!) I had some awesome rock-hard thighs and square calf muscles then -- I miss them now because now I have toothpick legs!
If you want to eat more calories, just make sure you still eat healthy foods (though you can splurge a little -- for example, my mom let me eat ice cream every day in high school because I needed calcium and I wasn't gaining weight!) Even if you're underweight, you can still have high cholesterol, blood pressure, and even body fat (if you have all fat and no muscle) so don't go crazy and eat at McDonald's every day or something
Otherwise I don't have a lot of tips. I could never gain weight when I was younger no matter what I ate, and I even lost weight in college and was way too skinny even though I ate a ton and never exercised, but that was due to a medical condition. I had allergies and apparently my body was spending every calorie it could to fight the allergies, because when I started taking allergy medications I gained 10 lbs in 10 weeks (!!) and then a little more weight gradually over the next year. But I still have my parents' high metabolism; I only gain weight now if I eat terribly, like fast food several times a week and lots of snacks, but usually my weight pretty much stays the same now! I would love to be able to gain weight in my hips and legs rather than my tummy (I'm amazed I have tummy rolls when the rest of me is so skinny, lol), but I don't think that's going to happen unless I start working out again