Use three diagnostic questions: when? (time), where? (place), and in what state? (condition). Next ask whether the word is interrogative or conditional, then locate its syntactic role.
Additional example: مَتَى تَعُودُ؟
When will you return?
Matā: interrogative time adverb.
Book example: أَيْنَ تَمْشِي؟
Where do you walk?
Ayna: interrogative place adverb.
Book example: كَيْفَ أَنْتَ؟
How are you?
Kayfa: interrogative in a predicate position.