To explain this, it depends how far we want to go with the answers.
According to Wikipedia, it's one of the question on List of unsolved problems in neuroscience related to Learning and memory which are:
- Where do our memories get stored and how are they retrieved again?
- How can learning be improved?
- What is the difference between explicit and implicit memories?
- What molecule is responsible for synaptic tagging?
There are many unknowns in that field, because it's paradox of using our brains to understand our brains. Basically our brains are too complex and if we were simpler, we'd be dumber and couldn't understand it, anyway.
As Ian Stewart quotes:
'If our brains were simple enough for us to understand
them, we'd be so simple that we couldn't.'
Here are some answers according to mainstream science:
All our memories do get stored by the brain for varying periods of
time; some are stored in our short term memory and don't stick with us
for very long, while others are filed away in our long term memory.
The actual capacity of our brains for storing memories has been
difficult for scientists to determine, though it is believed that
because our brains consist of a vast number of neurons
Experts believe the brain uses three memory-storing stages: sensory,
short-term and long-term. The different stages act as filters,
beginning with when we first see something, until the flood of
information is processed. The filtering protects us from having too
much unnecessary information requiring storage. Perception, therefore,
is the first step in memory creation and is associated with the
sensory stage, where the registration of information during perception
takes place for a brief second. Sensory and short-term memory
information tends to decay rapidly, with only the important
information gradually moved to long-term memory.
Short-term memories like a possible chess move, or a hotel room number
are processed in the front of the brain in a highly developed area
called the pre-frontal lobe, according to McGill University and the
Canadian Institute of Neurosciences, Mental Health and Addiction.
Science tells us that while our brain may store different types of
memories in various areas of the brain, recalling a memory is a
Types of memories and where they are stored in the brain include:
- Semantic memory: General knowledge, trivia and facts are stored in the temporal lobe and the cortex.
- Episodic memory: New data and recent events are stored in the prefrontal cortex and the temporal lobe.
- Working memory: Information and knowledge required for daily life -- such as telephone numbers and learned skills like driving --
are stored in the prefrontal cortex.
- Procedural memory: Secondhand skills, things we take for granted, such as walking and cycling, are stored in the cerebellum.
While it isn't known exactly how many connections are possible in the
brain, or how large the storage area for memory might be, scientist do
know that our memories are not stored in one memory center in the
brain, rather, the events and experiences of a single memory may be
stored in many different areas of the brain. For example, when someone
recalls a trip to the beach, he or she might remember that the sand
was white, the ocean was blue, the air smelled like salt water and
seagulls were squawking. To recall that one memory, the brain doesn't
visit the "beach memory center," but pulls the different components
together from various cortices. The blue water and white sand are
retrieved from the visual cortex, the salt water smell from the
olfactory cortex, and the squawking gulls from the auditory cortex.
For the average person, not every memory is consolidated, or stored,
in long term memory, freeing up space. But in certain rare cases of
exceptional memories, some people have been known to store and
perfectly recall nearly every detail of every memory from most of
their lives, a syndrome known as hyperthymestic syndrome. Researchers
declared the first known case of hyperthymesia in a subject known as
AJ, a then 40-year-old woman could accurately recall every event that
had ever happened to her since the time she was 14 years old.
Another thing what is also interesting to point, that Einstein's brain was removed during an autopsy and kept it in hopes of studying it to unlock the secret of Einstein's genius. It's theorized that the lack of the fissure allowed his brain cells to communicate faster than the average human's. In summary the three histological studies of Einstein’s brain have, in spite of claims to the contrary, found essentially no differences between his brain and that of controls. This should not come as any great surprise. The brain is obviously an extremely complex structure… to believe that the analyses of one or a few tiny slices of a single brain could reveal anything related to the specific cognitive abilities of that brain is naive.
According to New Age movement and similar (not supported by the mainstream science) our brain is a biological computer that interfaces with a conscious entity (our consciousness, soul or higher-self). And our experiences/memories are stored in forms of the akashic records (on quantum level in forms of photons) in our DNA (which is our quantum mechanical biowave computer) as part of our etheric body and are retrieved by our consciousness by our free will. Various of peoples out-of-body experiences supports that theory including some scientific evidences. Our brains still have some storage function, but it's not the main repository of our memories/experiences.
The scientific theories are in favor for above:
Including controversial project called Global Consciousness Project relating to the anomalous spikes that precede the towers being hit 9/11.
There is also the new research from Emory University School of Medicine, in Atlanta, has shown that it is possible for some information to be inherited biologically through chemical changes that occur in DNA.
See also DNA is a Torsion field antenna by Dr. Len Horowitz and scientist proves DNA can be reprogrammed by words and frequencies.
Scientists which support New Age theory are i.e. Max Planck, Robert Lanza, Gregg Braden and many more.
“I regard consciousness as fundamental. I regard matter as derivative
from consciousness. We cannot get behind consciousness. Everything
that we talk about, everything that we regard as existing, postulates
consciousness.” – Max Planck, Nobel Prize winning originator of
quantum theory, as quoted in The Observer (25 January 1931)
Max Planck said "As a man who has devoted his whole life to the most
clear headed science, to the study of matter, I can tell you as a
result of my research about atoms this much: There is no matter as
such. All matter originates and exists only by virtue of a force which
brings the particle of an atom to vibration and holds this most minute
solar system of the atom together. We must assume behind this force
the existence of a conscious and intelligent mind. This mind is the
matrix of all matter" in 1944.
Albert Einstein: "A human being is a part of the whole, called by us
"Universe," a part limited in time and space. He experiences himself,
his thoughts and feelings as something separate from the rest—a kind
of optical delusion of his consciousness. The striving to free oneself
from this delusion is the one issue of true religion. Not to nourish
it but to try to overcome it is the way to reach the attainable
measure of peace of mind."