This phrase suggests a voluntary decision to avoid others, not just being alone. He chose to shut himself off from everyone after moving to a new city.
Pro Tip 2/3
Emotional State
It often indicates a coping mechanism in response to emotional stress or pain. She shut herself off from her colleagues when she was dealing with grief.
Pro Tip 3/3
Not Literal
It's used metaphorically and doesn't mean physically closing something. Even on social media, he's shut himself off from interacting with people.