I've observed that you can do it in a few ways.
One way is to screw it up on your own and to look like a fool and to learn from it (ie: "gee, I won't do THAT again"). I've tried this approach many times with varying results. It works, but only if you don't have to see these people again ( not a good choice for co-workers or neighbors). If I know I'm not likely to meet people again ( like at a theme park or "waaay" out of town) then I'm less likely to worry about any embarrassment and more likely to conduct social experiments on my own. This approach also works in bars/clubs because if you blunder socially, you can always blame it on alcohol--- even if you don't drink ( I just say "I've had one too many at the bar". They don't need to know that it was only a Coca Cola).
Another way is to NOT talk and just watch people ( this is not unlike watching birds at the feeder and learning to understand their mannerisms and calls) from a distance. This works better with people you might encounter repeatedly IF you can actually watch them without their knowing it. For if they know you're looking their way, they're likely to come over and attempt conversation before you've studied them enough. Even then, as long as they do most of the talking, you can get through by simply answering questions and then getting back to work. You can watch more later and learn later. Often times with co-workers, the less said is the better--- a job kept is important, more so than trying to look "cool".
Always have a few catch-phrases handy:
" Hi there." ( similar replies will ensue)
" How's it going?" ( most people will wither say "fine" and leave or they'll begin yabbing about how un-fine they are--- but at least they are still doing the talking and not forcing you to.)
Doing these things will not make you super suave in public--- in fact, I goof up often and still look like a fool/odd/whatever. I'll always feel like the square peg in a sea of round holes. But it HAS helped. I can at least make my way in the world, more so if I really try hard. Good luck to you.