The cerebral cortex handles the brain's "executive controls". Those are the controls the that organize the brains tasks processing. The controls are divided into two stages.
The first is goal shifting. Goal shifting happens when you switch your focus from one task to another.
The second stage is rule activation. Rule activation turns off the rules (how the brain completes a given task) for the previous task and turns on the rules for the new task.
So when you think you are multitasking you are actually switching your goals and turning the respective rules on and off in rapid succession. The switches are fast (tenths of a second) so you may not notice them, but those delays and the loss of focus can add up.