All of us are lonely at times. The price of being human and an individual. In extreme cases the chronic feeling of loneliness and alienation from other people is a symptom of a failure mechanism.
Extreme loneliness is an alienation from life and your real self, severed contact from life. It becomes a vicious cycle and human contact becomes unsatisfying. It can turn a person into a social recluse, cutting off a pathway to find themselves again. Through social contact like dancing, stimulating conversation, playing together we're able to forget ourselves, our shams and pretenses.
Social contact is a way to become comfortable with ourselves. Loneliness becomes a way to protect ourselves against exposure. A lonely person is afraid of other people. They often complain that they have no friends. It is a set up. A lonely person becomes expectant on other people to make the initiation. Take control of the situation and put yourself out there. Make the first contact. It is a cold plunge at first, but you will find yourself warming to other people. Development of social skills is a learning. If you fear social situations, expose yourself to them frequently and the fear will ease. Once a lonely person becomes an active contributor to a social situation, he will find himself socially accepted and become more comfortable with other people. The experience of social acceptance will enable him to accept himself. Funny how that works.
Source - Psycho Cybernetics by Dr. Maxwell Maltz