I'm a middle aged guy who often, surprisingly, finds my drinks are comp'd. My wife is pretty and looks younger than I do and she doesn't get this benefit -- partly b/c the expectation is that guys buy girls drinks. Still, people ask me how/why I get so many free drinks...
How to get free drinks:
Sit at the bar -- you can order food here too and can get good service. (If you follow all the advice your drinks might not even appear when you sit at a table.)
Go to a restaurant/bar that doesn't measure by electronic and/or measured stoppers, and avoid chains...
Go early or late so that they come to know you and not the crush of folks behind you. At least once or twice a month.
Be friendly, but don't assume that just asking the bartender's name or saying 'bro' will earn you points. (Don't ignore or forget the name either, provided you hear it -- be subtle.)
In addition to going there somewhat regularly, ask the staff about themselves. Are they studying for a degree? What shows are they looking forward to? What tattoo artist is best around here? What new wines/beers are coming in and why? Carefully -- IF not this, what are they hoping to do? *Avoid sports*. Even most of the guys probably don't care a bit as much as you do!! Really!!
**Show some appreciation for their knowledge. If they know beer, talk about hop schedules, etc.. If they know wine, talk about varietals, regions, dry vs semi-sweet, etc.. Ask their advice, and be honest about how their advice has helped you. They let you taste and X and you didn't care for it, tell them 2x more times about how much you appreciate the *Y* they let you taste and you then went on to order.
Don't be impatient. They will get busy. If you are sitting at the bar, they will get busy with orders for the seated tables. Just wait.
Don't try to be slick or flirty!
If you are respectful and give a nod to their understanding of their profession you will find drinks disappearing from your check!
PS ALSO, be sure sure to tip AS IF you got all of the drinks you ordered. Maybe add a bit to compensate if they bought for you at cost to them (still small, but a cost). Even if I tip at 25%-50% on the theoretical total I'm ahead vs 20% on the actual total.
PPS the bottom line is be a nice and genuinely friendly person. If you aren't getting free drinks already, maybe you aren't as nice as you think you are. :)