Throughout the BBC Horizon show "The Secret You" the idea of consciousness is considered. "Where does consciousness reside?" being one of the many prompts given for this video. To describe where consciousness comes from, we also need to define what consciousness itself is.
Within the brain stem is a group of nerve cells called the reticular activating system. These nerve cells send signals to the thalamus, which acts as a "relay station" to send signals to different areas of the cortex. To quote the video, "consciousness appears to be all about constant activation of the cortex."
In the last ten minutes of the video they talk about conscious and unconscious brain activity.They show scans of a brain that is awake and also of the same brain when it is asleep. When the brain is awake it will trigger other parts of the brain after another part of the brain was stimulated, but when the brain is asleep the stimulation remains localized and does not trigger other parts of the brain, as is does when you're awake. If you say being awake means you are conscious and being asleep means you are unconscious, then it would almost appear that consciousness is the continuous transfer of activity of the brain.