Wikipedia
Mind-wandering (sometimes referred to as task-unrelated thought) is the experience of thoughts not remaining on a single topic for a long period of time, particularly when people are engaged in an attention-demanding task.
Mind-wandering tends to occur during driving, reading and other activities where vigilance may be low. In these situations, people do not remember what happened in the surrounding environment because they are pre-occupied with their thoughts. This is known as the decoupling hypothesis. Studies using event-related potentials (ERPs) have quantified the extent that mind-wandering reduces the cortical processing of the external environment. When thoughts are unrelated to the task at hand, the brain processes both task relevant and unrelated sensory information in a less detailed manner.
Mind-wandering appears to be a stable trait of people and a transient state. Studies have linked performance problems in the laboratory and in daily life. Mind-wandering has been associated with possible car accidents. Mind-wandering is also intimately linked to states of affect. Studies indicate that task-unrelated thoughts are common in people with low or depressed mood. Mind-wandering also occurs when a person is intoxicated via the consumption of alcohol.
It is common during mind-wandering to engage in mental time travel or the consideration of personally relevant events from the past and the anticipation of events in the future. Poet Joseph Brodsky described it as a “psychological Sahara,” a cognitive desert “that starts right in your bedroom and spurns the horizon.” The hands of the clock seem to stop; the stream of consciousness slows to a drip. We want to be anywhere but here.
Studies have demonstrated a prospective bias to spontaneous thought because individuals tend to engage in more future than past related thoughts during mind-wandering. The default mode network is thought to be involved in mind-wandering and internally directed thought.