A lot of guys ask this, "What if she tells me she has a boyfriend?"
The fact is, most beautiful women have a boyfriend most of the time. If men are like spiders trying to catch as many women into their web as they can, women are like swinging tree-monkeys, swinging from boyfriend to boyfriend but never letting go of the first without having a second lined up to grab onto. So you can't just ignore women with boyfriends or you'll severely limit your options.
Most of the time if a girl says she has a boyfriend just ignore it and keep gaming her like normal. Usually, the girl will come around. By the way, the worst thing you can do is let it stop you dead in your tracks, the girl is testing you to see if you're a wuss. Guys got to learn that women like the chase. It's the thrill of the guys attention and pursuit that also triggers desire in her.
One technique to use is a "boyfriend destroyer". A boyfriend destroyer is especially effective if her boyfriend is not meeting her core values and she's looking to leave him anyway and just needs an extra nudge out. This is a way of rooting out the bad her boyfriend has done and making her want to dump him even more. Ask her about why she feels for him still even if he's not making her happy. She'll rattle on about things he didn't do or times he hurt her. Just nod and agree and eventually change the subject because you don't want to let the negative feelings fall on to you because at that moment all men will seem like scum to her.
Another way is to ask a girl what her boyfriend is like. You got to do this in a casual conversation. She'll of course start telling you all about him. You'll probably get the juicy details about how nice he is and such but try to find out what she doesn't like about him or the things he does that drives her up the wall. Why are you so interested in her boyfriend? You're not, what you're doing is gathering information on things she likes and dislikes about a man. She is volunteering this without her even knowing it. You may be able to put some moves on her but slowly because she's still with another guy. Find ways to hint that you like her of sorts. Maybe get her number.
One thing is that some girls are just ga-ga over their boyfriends. Those guys can't do anything wrong even if it was done in front of her. These girls, you can forget about. She loves him and there will be no hope of them splitting up. He will be forgiven for all wrongs so cutting in is near impossible. Sometimes you got to bow out of the scene and take centre stage elsewhere.
Bar advice. Not to say that it's good to take another guys girlfriend but if you like someone, go get her. Advice here is remember this. Other guys may just do the same to your girlfriend against you with this same tactic.