Making the effort.
My mother and one of my sisters are both mega popular. I wouldn't say this was because they necessarily have much better (or more likeable) personalities than me (my sis, in particular, can be a little bit of a cow on occasion!), but purely that they are much more gregarious, and always try hard with people.
I'm a bit of an introvert so will be happy meeting up with people one night a week, planned in advance, and will then have a great time. I'll usually only go out if I fancy the activity, and not just for the sake of it (exception for special occasions). They, on the other hand, will accept pretty much any invitation, and go out multiple times a week, with different groups of friends.
I see an acquaintance in the shop, I smile, say hello and wander on. They stop and chat for half an hour. That way an acquaintance soon becomes another friend.
If it's a work colleague's (that I'm friendly with, but not friends, as such, IYSWIM) birthday I would probably wish them happy birthday, maybe by them a card if it's a big one. They would get them a little present, offer to go out for lunch, etc.
Even people who are not 'nice' but still popular seem to out some effort in, knowing people's names, (even if it's just to bitch about them!) details of their lives, etc.
Often on here people complain that they don't have any friends, but then whatever suggestions are offered they turn down immediately. There seems to be the expectation that other people should make the first move. Well, if you've just moved to a new area, and everyone else has lived here for yonks and has a great group of friends, they're not really going to be bothered, are they?
Making (and keeping) friends as adults can be hard. People have to be prepared to put the effort in!