Love that first question and I think it is very important, secondary to me is how we process sensory information ....the mechanisms for that are present from what we know about pattern recognition, we have simulated (using neural networks and more recently neuron-less statistical learning approaches) that part of brain function going back to the early 90's. We even have been able to do it virtually using computer programs but what of intention? drive? What unseen force drives the shift of thoughts?
It is pretty obvious when we think backward in time, imagining that our homonid brains could be de-evolved with each second accounting for 100 years in evolutionary time. In 10 seconds we'd only be at 1,000 a.d. not much changed biologically, in 100 seconds we'd be at 10,000 years...still not a major shift, 500 seconds and we are at 50,000 years...now things are starting to get interesting....for we don't see any evidence of formal writing systems, 1,000 seconds in our trip and we are back to 100,000 years...no homo sapiens sapiens have left Africa and the world is "peopled" by at least 4 lines of homonids cotemporaneously. Homo Sapiens Sapiens in Africa, Homo Erectus advanced variants in Asia and Europe and Australia. We need to go back further and faster, if we shift back 2,000 seconds at a time, we push back the clock by 200,000 years per jump. At 5,000 seconds we are a million years de-evolved, the crania of the human populations (advanced homo erectus) are some 60 percent smaller than in modern humans. At 10,000 seconds , we are further behind still (archaic homo erectus)...as we play the clock back we watch the brain size shrink across homonid populations and by about 25,000 seconds we are at 5 million years ago...and we've reached the time frame of the common ancestor with the chimpanzee a primate that has a brain size just 1/3 to 2/5's the size of an average human being.
Why run the clock backwards? In seeing how the structures emerge and change over time and as our ancestors grow we see the adaptations they evolved written in the transition. Just recently a team of researchers were able to illuminate clearly the linguistic pathways in the brain that enable humans to string words together into sentences. It was found that this pathway *does not exist* in lower apes and explains why though they are adept at symbolic representation (words) they are deficient in dynamic expressions of symbols (sentences). These thought experiments offer clues as to how our cognition is differential from other primates and will help us (through comparative genetic analysis) precisely what has been added as *new* since the last common ancestry. It is a remarkable time we live in where the theoretical possibility to answer these deep questions of difference is actually realizable.
However, I digress from our story...to answer your question we need to keep going back in time. As we continue to add seconds we go back millions of years...from chimpanzees to more ancient giant sized (because they were purely vegetarians that required large guts) species like gorillas, orangutangs, further back still and the primate family in total starts to shrink (read: less diversity) to appear as clans of old world monkeys, their brains a fraction of ours...barely a skin of cortical mass on top of a large portion of limbic brain...and what is housed in the limbic mass? Mostly memories but most important to answering your question: autonomics and emotion. These are the master clocks that drive when we are hungry or thirsty, hot or cold....these tell us how to associate with past memories levels of importance to survival. A burger brings joy to most people who are hungry upon observation because it is food and food is tied with reduction of hunger. It may also be tied with other memories, of our first burger, of the taste of cheese or ketchup...our minds become alive with those associated memories of eating a burger *and the emotions* tied to those memories...where it not for this tying together of the autonic drive (the hunger) and the memory of good emotions associated with the food...I posit we'd have no desire to ingest burgers. We'd be automota that sit there waiting for specific instructions to process....sound familiar? It's the same type of computing machine we've been building....though with artificial means, binary computation in most cases but most recently non linear processors are being designed...but the heart of consciousness and cognition I posit is little to do with the over all paradigm of the architecture but more to do with how that architecture is self connected.
This being true, mirroring that self connection in artifical minds be it with physical or virtual neurons and system pathways is the key to emergent of dynamic and conscious entities, tying the processing portions to simulations of autonomics and emotion will then enable the agent to find it's own way, make inferences from the data it is relating as it "learns" and emerge a complex and hopefully stable consciousness similar to our own once enough multi-sensory inputs are tied together.
You see, another thing we notice about our thought experiment is that as the brain shrank...the cortical regions devoted to processing various sensory input (sound, sight, taste, touch) all increased in contiguous area...I posit this touching of these regions allows the persistence of *thought* in the mind once triggered by some autonomic urge (every thing starts with autonomics) ...to me, the drive imparted to an individual via autonomics is akin to the shaking of the trunk of a tree...the relatively small vibrations at the trunk translate to wild and varied undulations of the attached leaves on the ends of branches of the tree. Consciousness is like echoing of those leaves from the vibration...across the experience and meaning landscape gathered by the individual. When you are hungry what do you do? When you are cold what do you do? When you fear something how do you know that you should? All our reactions to events in the world are learned ones...we've all seen how a baby with no knowledge of "falling" would walk right off the edge of a table. At that stage in life the mind literally has not built the association between the effects of gravity and danger...and so falling is the only way for them to realize that...as they get older they learn the similar power of fire and other elements in the world. As one of the most ancient sensations I believe "touch" starts the roller coaster of correlations that drive a new born to experience through touch the world...constantly relating everything through touch...soon after touch and taste combine, in some babies this happens in the womb (sucking their thumb)...the cognitive space of the child grows every more and more and start tying into one sense at a time correlating each to the other and filling in the details in cognitive processing in the cortex and associated memories of that processing as correlated to past needs and how important those were (emotions).
Slowly build this process over time across the different sensory inputs and I assert we construct in our own brains a unique response to the world when presented with events, a unique response that undulates with time that we call a "consciousness" , "self", "me".