Alone, can be used as an adjective or adverb. In both cases it means without other people or on your own.
I like to take walks alone.
Everyone has left the party; I think we’re finally alone!
Lonely is an adjective. It means that you have a negative (sad or unhappy feeling) feeling because you are not with other people.
I get lonely when my roommates go away for the weekend.
One thing to think about that helps me remember is just because your are alone it doesn’t mean you are lonely!
image taken from: letmebewhatsunderneath.com