The teacher can suggest categories or ask learners to come up with their own categorisation.
Example
Learners categorise conjunctions according to their function.
In the classroom
Examples of activities include categorising words according to type, e.g. verb, noun, preposition; categorising functions, e.g. request, order, suggestion; categorising vocabulary by negative or positive.
Further links:
https://www.teachingenglish.org.uk/article/vocabulary-activities
https://www.teachingenglish.org.uk/article/snack-facts-recording-vocabulary