Memory retrieval is like revisiting the past. Brain patterns that are long gone can be revived by the memory system.
We can see some evidence of what category the subject is trying to recall before they even say anything, so we think we're visualizing the search process itself.
When you have an experience, that experience is represented as a pattern of cortical activity. The memory system, which we think lives in the hippocampus, forms a sort of summary representation of everything that's going on in your cortex.
The memories that came up would be hits and the ones that most match your queries would be the ones that came up first.