Related: place cells. If a rat is in a room, there are cells that will fire when it's in a specific place. The specifics are pretty cool!
One can possibly think of the hippocampus as a 'space-time integrator' that continuously indices high-level activation patterns from the cortex and stores them much like a log book. Memories in the hippocampus last minutes to months, after which they are either transferred to long-term memory in the cortex or lost.