When someone says ‘for a while’ that want to talk about an action that takes place for a short period of time. Usually, the amount of time s unspecified in the context. ‘Ria stayed at home for a while’ In the above sentence, the speaker wants to tell us that Ria stayed at home for a short period of time.  ‘She talked to me for a while and then left’ In the above sentence, ‘she’ talked to the speaker for a short, but unspecified amount of time before she left.