Collecting the best books mentioned on hacker news, reddit and other places
It's not just a game. Hosting a party takes some preparation, and preparation means things can take longer than expected. I sometimes arrive at parties at the moment they're scheduled to start and never has the host been anything but welcoming and gracious. But don't mistake, I'll be helping the host finish up the party decorations, set up the bowls of chips and arrange the beverages for the first 10-20 minutes.
Arriving to a party early is nonetheless a very good idea. It almost always means you get to intimately socialize with the host, a chance you might not get when the party has already started, especially if you're on the shy side of the spectrum.
Arriving early to parties is one of the tips in Leil Lowndes' "How to talk to anyone" that I read and can recommend.
I don't know the parent commenter, but I am confident he or she would not characterize that as luck.
Here's a book that can help you stop thinking it has anything to do with luck:
How to Talk to Anyone: 92 Little Tricks for Big Success in Relationships 
I enjoyed 'How to talk to anyone' - http://www.amazon.com/How-Talk-Anyone-Success-Relationships/... for general advice.
There is also Dale Carnegie's 'How to win friends and influence people' https://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influen...
Apart from that, maybe join some kind of regular group that is more oriented for social than physical? Toastmasters or something like that or even board game groups (most games have some social aspects to them). Wine tastings also come to mind. Just choose activities where you know you will have to speak with people.
Socializing is the process of learning the tricks, implicit or explicitly, which people use to form bonds.
Basic tricks you can pick up from something like http://www.amazon.com/How-Talk-Anyone-Success-Relationships/...
And DO IT ALL THE TIME. Talk to everyone. Talk to cashiers, talk to random dorm people. Talk to professors. Talk to them like people. Be interested in them, etc.
As far as building friendships, the trick it to talk to people about activities that might be interesting and plan to do those things. Then do them. It might be as convoluted as a dinner + play + drinks evening out with time tables and tickets, or it might just be a game of NHL hockey on the Xbox 360 later at 9pm.
Women(or perhaps men, depending on sex/inclination): Just talk to them. They're primarily people. Additionally, ask people out constantly if they're interesting to you in that way. The 2nd time you see them or the 15th minute of talking to them should be about when you think to do that. "Out" implies an activity, and little else. It could be disc golf, or walking around town even. It's about talking.
For any social situation: Read a bit about the news, and a couple obscure (non tech, not all political, but some is okay) sources. Talk with people about them. Figure out how to ask questions about what people think about the happenings of the world which someone could have an opinion on without having read the item in question. This is a great way to make sure you're not totally out there and silent.