I believe everybody goes through periods where they feel lonely. Some get past it quickly (either because they enjoy being by themselves or because they can have the company of others whenever they want), whereas others, because they suffer from some sort of emotional turmoil (depression, anxiety, etc), are sort of forced into that state of being lonely.
Being alone is different than being lonely.