Have you ever heard the expression "trapped in my cave" or "I'm too busy to socialize" or "I'm in tunnel vision right now" from colleagues at work? These people eat at their desk, stay late at work and generally aren't available for after-work activities, office get-togethers and even informal small-group lunch gatherings.
Why? Don't they like people? Well, they do, but the're trapped. Sometimes great workers and great people get wrapped-up in projects and get in over their head and are just trying to catch-up. Their project may be in crisis mode. Other times they fear making "connections" with co-workers because of the possibility that personal relationships may cloud professional interactions and make any "possible" conflicts or unpleasant events in the future a bit more messy or full of even more discomfort.
As a leader, how can you help prevent this from happening in your team, or to you? For the people who seem too swamped to "come out of their cave," take a look at their workload and figure out if they need help or if they are being buried by work.
Then take steps to help them get a balanced workload. Another way is to "force" them to interact by "bringing the break to them" by dropping-by during lunch (they will be eating at their desk) and "kidnapping them" to lunch, or to the office lunch-room (in a friendly way).
They will likely appreciate it, even if they protest. Just respect their situation and be aware that they may really feel overwhelmed. If they are a peer worker, think about probing to see if you can help them find a way to speak up about being overwhelmed. Great leaders don't want teams to feel buried. Your team leader will likely be keenly interested in resolving this situation.
What about people that seem to "fear" developing friendships at the workplace? Look at the office or company history, and at their history in particular. Have there been painful re-orgs or even layoffs that resulted in close friends being separated? Has this person lost a close co-worker to a sudden layoff? To understand them, remember that it can seem less painful to isolate yourself than to lose a close friend to a re-org. Encourage them to connect "generally" with groups of co-workers. This is an easy way to get them to ease-into socialization and into building relationships. Groups are "safer" than 1:1, and can be a good way to get these people to connect more frequently with the greater team.
Watch your own behavior. Are you (or are others) *very close* to co-workers? That's great, however it can be a bit intimidating to shy or introverted workers. Try to be sensitive to wall-flowers, and invite them into your group activities and spend time asking them lots of personal questions to get to know their story. You will be surprised how much even "shy" people enjoy it when others are genuinely interested in them.