There is a huge difference between being lonely and being alone. People sometimes use it interchangeably without realizing the difference between the two terms. I can, of course, elaborate on this only from my personal experience. Being alone is by choice. When you choose to excuse yourself from the social world (the real one, not the virtual one), you choose to be alone. Lonely is when you do need people around you and nobody is present.
During my undergraduate years, I was pretty focused and knew that to achieve what I wanted, there was no other way than working hard and avoiding distractions that are typical in college life. This was really difficult for me to do because I had socialized a lot in school. I loved going to movies, celebrating every birthday that could be celebrated, going for food and various other activities. Even bigger problem with being alone at that stage was the college life itself.There is way more freedom when you're attending college. No one really cares what you are doing.
There I was, trying to isolate myself because I had to go to a good graduate school and that was my priority. Four years passed in a flash. I got accepted to a few graduate schools and rejected by many. I sometimes think if I had not worked as hard as I did, I wouldn’t have received an admit from anywhere. That was me being alone, which finally did pay off. Could I have socialized more? Of course I could have! Could I have socialized even less and got into better places for graduate school? Of course I could have! Did I want to socialize that little? No!
Now that I have reached graduate school, life seems organized for the first time in a long time. But now I feel lonely. Everyone is busy aiming for their next goal. Undergraduate was an eclectic mix where you would find all kinds of people. Graduate school? Everyone seems the same: focused and determined. No one has the time to socialize. Moreover, my definition of socializing is pretty different from what you might be picturing. Socializing for me is meeting a few select people and just talking for an extended period of time. We hardly even get the time to do that.
Sometimes, you may come back home after a long day with only a desire to talk to someone. However, there is no one with whom you're able to talk to, without fear of judgement, of course. Many people may also criticize you as you talk to them. At this point, you're already pretty tense. I understand. It is best to avoid such people. There are enough obstacles to overcome daily, from getting up in the morning to completing tasks during the day. Don't add an extra strenuous item to the list of difficulties you'll encounter throughout your day.
These are the times when your family plays a big role. Most of us can talk to them without the fear of being judged aggressively and being mocked at. Somehow your family will understand you. They know the kind of mess you can be and have been. Always.
Something that has always helped me lighten up is talking to someone. That someone can be anyone, whomever is willing to listen. Talk. It will only help you!
And, if you ever find someone who you can talk to without the fear of being judged and that person actually “gets you”, stay with that person. Such people are very hard to find.