This from the National Institute of Health on how the brain summons up past experiences:

The brain cells that fire when a person watches a brief film clip are triggered again when the person thinks back on that imagery a few minutes later, a new study shows. The research offers insights into how the brain summons up past experiences and may also provide clues to brain disorders, like Alzheimer’s disease, that harm short-term memory.

Scientists have known for decades that memories are often processed and retrieved by the hippocampus, a curved structure deep in the brain. But exactly how memories are recorded and recalled remains a mystery.