Try and remember a vivid memory, like getting your learner’s permit, and now try to remember what you had for breakfast last week. Why do some memories just come and go? In TED-Ed’s latest video, “How memories form and how we lose them,” host Catherine Young delves into the process of memory formation, and what mechanisms are behind why we remember some things and forget others.

When you experience something, this event is converted into a pulse of electrical energy that zips along a network of neurons, according to Young. This information first gets stored in short-term memory, where it's available anywhere from a few seconds to a couple of minutes. Then, the experience gets transferred to long-term memory areas such as the hippocampus — the center of emotion, memory, and the automatic nervous system — and finally reaching several storage regions across the brain.

Now, if two neurons communicate repeatedly, at dedicated sites known as synapses, this improves the efficacy of communication between them. This is known as long-term potentiation, the mechanism by which memories are stored long-term.

Memories are embedded into our psyche the most when we're paying attention, when we're deeply engaged, and when information is meaningful to us.

But how do some memories get lost?

There are several factors that contribute to bad memory, including age, chronic stress, and mental health conditions such as depression. As we age, synapses begin to change and weaken, affecting how easily we can recall memories. This deterioration has been attributed to the brain shrinkage as the hippocampus loses five percent of its neurons every decade. The drop of production of neurotransmitters like acetylcholine — vital to learning and memory — can also affect how we store information.

Meanwhile, chronic stress can turn our bodies hyperalert, which is a response that evolves from the physiological mechanism that ensures survival in a crisis. During chronic stress, the body gets flooded with stress chemicals, resulting in a loss of brain cells and the inability to form new ones. This affects our ability to retain information.

Lastly, isolation tied to depression is another way to lose memory. However, this can be offset with social integration. A 2008 study published in the American Journal of Public Health found that elderly adults with high levels of social integration had a slower rate of memory decline over a six-year period. This gives the brain a mental workout.

Just like muscle strength, we need to use our brain or risk losing it. Young suggests physical activity (gets blood flow to the brain), eating well (provides the brain with nutrients), and challenges (like learning a new language) are the best ways to preserve your memory and keep your brain healthy.