It’s not something you really ‘learn’. I mean, there are certain rules to follow, but it’s not like you can have your ‘rule cheatsheet’ in front of you while you’re talking to one. You just get a sense over time for what to do and what not to do.
Forget about flirting with them and just talk to them. Talk about anything that seems interesting. It will seem like you’re being boring at first but keep at it. Eventually you’ll just start flirting and you won’t even know how you got there.