R. Douglas Fields writes in Scientific American:
[The] transition from the present mental experience to an enduring memory has long fascinated neuroscientists. A person’s name when you are first introduced is stored in short-term memory and may be gone within a few minutes. But some information, like your best friend’s name, is converted into long-term memory and can persist a lifetime. The mechanism by which the brain preserves certain moments and allows others to fade has recently become clearer, but first neuroscientists had to resolve a central paradox.
More here.