I'm an expat so basically had to learn as I have literally zero old friends around here.
IME, it's a numbers game. I've made about five real friends here (as opposed to mere acquaintances) - that amounts to somewhat under a friend a year on average. I've literally got several hundred contacts around, though.
Of the friends I do have here, I met three via work. One I immediately clicked with, one I took a decent amount of time to get used to but genuinely live to bits nowadays and one worked well from the beginning but we only really made friends when she changed jobs and I was no longer her boss, which I find tends to complicate relationships somewhat.
Of the two people whom I've made friends with outside work, one was a date. We got on like a house on fire from the very start but the attraction wasn't there for either of us. The other one is friends with an acquaintance. We have quite a few interests in common.
As a general rule, I think you need to get to know tons of people to find the few you really want to be friends with. Or that's the case for me, anyway.
The good thing is that it's very doable. I'm definitely not someone who makes friends particularly easily.
Basically, you just start meeting them and in some cases you enjoy each other enough for it to develop from there.