system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Do we have any idea what is happening physically and/or chemically in our brains when we lose a "train of thought" and then are able to "relocate" it?
gpt
Nice question! German medical student here, currently working in the field of cognitive neurology and memory consolidation:

While nearly everyone knows the feeling you described, it is also one of the symptoms very often experienced by parkinson patients and therefore there are several mechanisms in discussion. In general: Whenever an unexpected event occurs, it appears to clear out what you were thinking. This happens by strong neuronal activation of brain areas that are needed in order to perceive this event (It could be a sound, something you see or a new thought). This event is usually processed with stronger neuronal activation than the train of thought you had before and therefore has priority. Additionally "the brain" sends a stopping order (similar to the stopping of a movement) that leads to the disruption of your thought. Physically it is of course electrical activation of neurons and a chemical communication through synapses that leads to the experience of "thinking". All this is initiated by a structure  of the brain called the "subthalamic nucleus". It is also involved in some particular symptoms of Parkinson's - the inability to change focus easily as well as the inability to initiate motion.

Now, when you "relocate" your train of thought you usually use your short-term-memory. A stimulus can activate a spatial pattern of activity across neurons in a brain region. As these neurons fire they represent a certain information by "population coding" which functions as a memory trace. If you mentally go back in time and start to think, the same patterns are activated by similar/or the same neurons that fired before and you are able to relocate your train of thought.

You may ask yourself "why do we experience this in the first place?", because it is kind of annoying and useless. Well, it all comes down to attention and alertness: In order to react faster to an event (like a lion jumping out of the bushes or to react in road traffic) you need to overwrite your current perception with a new focus.

So i hope this was kind of comprehensible and helpful.