A while is a noun phrase that refers to a period of time. It is made up of the article “a” and the noun “while”. For example:
- I’ll be back in a while.
- I need to rest for a while.
Awhile is an adverb that means for a period of time. It is made up of the article “a” and the adverb “while”. For example:
- She stayed awhile before leaving.
- He sat awhile before standing up.
In summary, a while is a noun phrase that refers to a period of time, while awhile is an adverb that means for a period of time.