Yes it's probably lactic acid building up. Here is a method I use to relieve the build up (taught to me by an indoor spin coach). Once over the top of the hill, or on a flat portion shift into a gear that is really easy to spin the pedals at a high cadence and do it for about a minute. That will actually (as he put it), send the lactic acid flying out of the muscles (I've also heard the Tour de France TV announcers say the same). Personally I've never witnessed any acid flying, but it does indeed relieve the build up. Give it a try next time out, and see what you think. Another thing to consider is taking a rest day. Muscles get stronger if they have time to recover. A day off will do just that.
What Trek said. People sometimes overlook the importance of rest days. Your legs wont get stronger as you ride. They'll get stronger as you rest and they have time to recover/ rebuild. Don't forget to to take a break every few days. And, again like Trek said, on the days you ride, let that acid fly!!!
sounds like a lack of conditioning, the tone of the post sounds as if you just started riding within the past couple of weeks. if this is the case, focus on turning your pedals faster in a lower gear as opposed to mashing the pedals and you will relieve some of the issues. My quads never hurt, even after a ride of hard climbing, they just feel tired and I struggle to get up my stairs energy wise but never any soreness.