I've had similar issues when I was younger. The key is not caring (about being rejected that is), which is a lot harder than it sounds like. Still, I can give you some basic tips which might work.
1. Read This guide to flirting
, because it'll help you a lot more than most 'helpful advice' from others. It's completely free and in fact based on scientific observation.
2. Body language. Altering your posture will not only make you seem
more confident, but it will actually help you be more confident in the long run. Basic things to watch are how you sit (straight up, shoulders slightly back, chin up) and how you walk (shoulders slightly back, eyes in front of you and not on the floor unless there is a legitimate danger of falling, semi-long strides if possible). Use eye-contact, but not constantly. I think more examples of this are mentioned in the guide.
3. Practice. Start talking to people. It's as simple (and difficult) as that. In a mall, on the bus - whatever. Just get into the habit of talking to girls and women. It doesn't have to be flirty, just start with regular conversation. It'll decrease anxiety and make it easier to transition to light flirting banter (ex. compliments on how she looks) - this isn't something you only have to do with girls or women you find attractive, either. If nothing else, some minor flirting will usually brighten a person's day.