Alone is an adjective and an adverb meaning that no other person is with you. When we use alone as an adjective, it never comes before the noun (predicative adjective):
She was alone when she heard the sad news. (adjective)
It’s impossible to discuss as a committee. The chairman alone will decide. (adverb)
Did they travel alone or did they take the children with them? (adverb)
Do you live alone? (adverb)
Lonely means that no other person is with you and that you are sad and unhappy as a result. We may choose to be alone but generally we do not choose to be lonely:
Without her friends, it was a long and lonely journey.
She says she feels very lonely and depressed living in that big house.
We don’t use lonely as an adverb:
I prefer going to lunch alone.
Not:
I prefer going to lunch lonely.