What Kimmyt said. I'm still new to this myself but I am learning thanks to all the wonderful advice given here. I asked nearly the same question not long ago. I took the advice to just ride the hills. Now I go out looking forward to riding this one set of hills. I go out specifically to ride it once or twice. In just a couple of weeks I've found that I'm stronger on the flats, don't get tired as easily, the little hills I hardly even notice any more and I'm not always the last person up a hill when riding in a group.

I try to ride up the hill seated until my legs start to feel fatigued a bit, don't let them get totally wiped out, then I shift up (harder) one or two gears then stand for a count of 6 to 12 revolutions, then sit and shift back down (easier) a gear or two. I keep my hands on the hoods. It's amazing how much that actually helps "rest" your legs without being too hard on you aerobically. Don't shift to an easy gear too soon or you'll just lose all the momentum you had. I agree, don't look at the top of the hill, just far enough ahead to hold your line and see any road hazards. It really does seem to flatten out the hill. Don't worry about your cadence at first. Just use your body as a guide, make it work but don't exhaust it. Once you find a gear you can make it up a hill in, next time try making it up in one higher (harder) gear. It will make your legs stronger. Now I don't have to go down to my smallest chainring in front (I have a triple). Also on the flats I'll shift up a few gears and work on standing. I've found that helps me when I stand on the hills.

On the 47 mile ride I did two weekends ago I was riding with a friend who has been riding for years. She's loves to mtn bike and just leaves me on the hills so I know she can climb. She actually told me she couldn't keep up with me on the hills on the last half of the ride. That made me feel pretty good. It does get easier. You just have to get to the point where you don't HATE hills. I don't like 'em a whole lot but at least I don't HATE them anymore (well at least most of the time I don't). They can really give you a great sense of accomplishment.