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.

Memory retrieval is like revisiting the past. Brain patterns that are long gone can be revived by the memory system.

[It is] much like when you try to remember where you put your keys last night. If you recall that you were washing dishes, that might trigger associated memories, leading you to remember that your keys are next to the sink.

The memories that came up would be hits and the ones that most match your queries would be the ones that came up first.