Psychology & Neuroscience Stack Exchange is a question and answer site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry. It only takes a minute to sign up.
If I like a particular song, I listen to it while doing other things until I get sick of that song. This creates an extremely strong bond between the two things: the song and the activity. The activities usually being programming languages or video games. Whenever I hear the song again, the emotions and/or visuals of whatever I was doing flood my brain, and I can remember them vividly.
How does hearing a song trigger memories associated with that song?
Is there anything special about songs and memory associations?
Has any particular research been conducted on the association between songs and memory?
I believe this phenomenon is well known in cognitive science. That is how our memory works.
The simpliest explanation would be the Hebbian learning rule: "Neurons that fire together, wire together." So, you can imagine some neurons firing when you hear the music and some when you see the game. Now, if these used to fire together, they are probably connected. Somehow you've learned that these stimuli come together and your brain is recalling them all even if this time only the audio stimulus is presented.
Try reading more about episodic memory:
For example, memories of people’s faces, the taste of the wine, the music that was playing, etc, might all be part of the memory of a particular dinner with friends. By repeatedly reactivating or “playing back” this particular activity pattern in the various regions of the cortex, they become so strongly linked with one another that they no longer need the hippocampus to act as their link, and the memory of the music that was playing that night, for example, can act as an index entry, and may be enough to bring back the entire scene of the dinner party.
Episodic and semantic memory
According to network models of memory, when information is stored in memory, it is not stored separately and by itself, but together with all the other aspects of the situation that you percieved. For example, if you listen to music, you do not simply memorize the tune, but also your mood, the causes for that mood (your girlfriend next to you), the smells and sights of the place, even what you did before and after listening to the music. Each of these informations is stored as a knot or node in the "semantic network" that is your memory, and with each time that things happen in conjunction, the connection between these nodes is strengthened a little bit.
Now, if you retrieve information from memory (e.g. you hear the music again or come to the concert hall and remember the place or tune), the node for that information gets activated and that activation spreads along the connections of that node to other nodes and activates them as well. So for example listening to that piece of music again will remind you of all the notable situations, but also of things that get activated through other activated nodes. For example remembering your girlfriend sitting next to you at that one time, will remind you also of how she broke up with you a few weeks later, and thus the music may make you sad, although when you listened to it the first time, it was a happy situation.
If you google for "semantic network" you will find comprehensive explanations, illustrations and examples.
As to the answer by Oriesok Vlassky explaining episodic memory: Both models integrate easily and do not contradict each other but rather complement each other well. So I would say the answer is his and mine combined.
Janata's (2009) study might be of interest to you. Specifically the paper proposes that the Media Pre-Frontal Cortex (MPFC) "...associates music and memories when we experience emotionally
salient episodic memories that are triggered by familiar songs from
our personal past."