The part of the brain associated with daydreaming also allows us to perform tasks on autopilot, a study has found.
A collection of brain regions known as the "default mode network" (DMN) is active when we are daydreaming or thinking about the past or future.
Cambridge University researchers found it also allows us to switch to autopilot once we are familiar with a task, such as driving a familiar route.
There is even hope the findings can help people with mental illness.
Previous research has found the DMN is more active during states of rest, and that it can behave abnormally in conditions such as Alzheimer's disease, schizophrenia and attention deficit hyperactivity disorder (ADHD).
But researchers have remained unclear about its exact role.
Switching to manual
For the current study, 28 volunteers were asked to match a target card, such as the two of clubs, with one of four cards shown.
They had to work out if the cards were supposed to be matched on colour, number or shape through trial and error. Their brain activity was monitored throughout using a scanner.
While they were learning the rule, known as the acquisition stage, a part of the brain known as the dorsal attention network was more active. It has been associated with processing information that demands attention.
Once they knew the rule and were applying it, the DMN was more active. They were particularly good at the task if their DMN activity was associated with activity in the hippocampus, the part of the brain associated with memory.
Lead author Deniz Vatansever says the DMN allows us to predict what is going to happen and reduce our need to think.
"It is essentially like an autopilot that helps us make fast decisions when we know what the rules of the environment are.
"So, for example, when you're driving to work in the morning along a familiar route, the default mode network will be active, enabling us to perform our task without having to invest lots of time and energy into every decision."
When the environment changes, and no longer conforms to our expectations, Dr Vatansever said our brain enters a "manual mode" that overrides the automatic system, or DMN activity.
The researchers hope their findings will help those with mental health disorders – such as addiction, depression and obsessive compulsive disorder who can have automatic thought patterns that drive repeated, unpleasant behaviour.Let's