It takes time. Being socially savvy is dependent on social and emotional awareness. Being in many different types of situations and navigating those situations. It comes with practice and experience.
A book that has great advice and tips is Dale Carnegie's How to Win Friends and Influence People. I would read that book and absorb its principles. It's a good start.
It's just trial and error. If you can join social clubs, group activities, gatherings, attend parties, that's great. It gives you more opportunities to socialize and gain experience and reps. If you're still in school, that's even better. Befriend people in class, get to know them.
One basic principle that I've always lived by is being genuinely curious about people. Taking genuine interest in people. Getting them to talk about themselves.
The most important thing is to get out there and just start talking to people and making friends. All you really need is a warm smile and to say "Hi."