Break the Silence,
This doesn't mean fart, this means break the barrier between not talking to her and talking to her. It can be as simple as asking what time it is, or if at a bus stop if she knows when the bus is coming, or anything really. This cuts the air between you two, and it gives a nice transition into number two.
The Kick Start,
This is where a little observation can easily come into play. This is what gets the conversation rolling, and please I will warn you right now, unless you are really good at bullshitting an answer, don't go Rambo and say something you might regret. Here's an example, say you see a girl at the bar, and she is wearing a band T-Shirt, though it is kinda lame and obvious, you could easily start a conversation about the band, just make sure you know some of there stuff, otherwise you may just look like an idiot. The whole point of this it to Kick Start the talk, so it doesn't end with awkward silence.
The Follow Through,
This is what all your hard work comes down to. This is where you have a good conversation with the chick, begin to wrap it up. If you need a reason to wrap it up, make one up. If you keep her wanting more of what you have given her a taste of she will most likely be willing to give you her number. Oh yeah, don't forget to ask for the number, because if you forget, then all you did was have a random conversation with a random girl, which seems rather pointless.
Just a quick example of when I used all the techniques, now this situation didn't end well because the girl I saw had a boyfriend, but I still used all the same steps. It was in the university library, and so I sat one cubicle away from her. I played on my computer a bit and then asked her if she could watch my stuff because I had to get something (Break the Silence). When I got back, I asked, "Do I know you from somewhere?" Yes I know its cheesy but it was at the university and I actually kinda worked. I continued by asking if her and I might have taken a class together, now it was a straight up lie but that didn't matter because she didn't know any better (The Kick Start). Her and I chatted and we ended up talking for a bit, on what program she was in, talked about motorcycles because I have one, ect. And finally I told her my friend was suppose to meet up with me in about 5 minutes, so I asked if I could have her number. Now I knew she had a boyfriend from the conversation we were having, but I figured I would give it a shot (The Follow Through). Most girls in a relationship, unless they are the cheating kind won't give out there number, in fact they will most likely ask for your. I gave her my number and went on my way, and to be honest I don't expect to hear from her ever, but it was better then just running when ya hear the word boyfriend, because you never know when there is a hot friend of hers looking for a guy. :D