The brain is a complex electrical system — the most advanced “computer” system we know. Memories are stored in the brain by turning specific cells on and off, much like the binary code (0,1) the underlies machine language in computers. (OK, I’m as old a dirt. You have to be my age or older to ever have seen machine language first hand. However, despite not seeing it, it’s there.)
A picture of the physical representation of a memory is called an engram.
When a memory is triggered, the engram reforms and prompts the various senses associated with the memory (site, smell, sound, touch). It’s pretty awesome.