Being alone indicates that there is no other person physically with you. Being alone can be good or bad depending on the situation.
Ex. I would like to be alone sometimes.
But when you are lonely, there is no one to talk with. You might have lots of friends around you, but you feel lonely because no one pays attention to you or wants to talk with you.