Aeon just had a great article on the consciousness, "Seeing and somethingness" https://aeon.co/essays/how-blindsight-answers-the-hard-probl... It argues that consciousness evolved out of sensation, where we developed an "inner self" to predict how sensations would affect us, and it's that inner self that became our conscious. Don't miss out on the comments section, the author answers a lot of question in there.
Like Dennett's book "Consciousness Explained", the Aeon article falls into the category of explaining what we are conscious of , not how it is possible to be conscious of anything at all. It does not really tackle Chalmers "hard problem of consciousness", despite the subtitle.
Here's my naive answer with just a bachelors in neuroscience.
There are some "business requirements" as far as I know.
We need:
- space and time
- memory
- inputs
- decision making models
- attention
You need space and time because thinking is a verb. Action is required which needs the passage of time.
You need memory in order to link past events with current ones. I'm not strictly talking about memory from earlier in the year or day, but also working memory from what you perceived a second ago. Continuity seems essential.
Inputs are require because we need a data stream to grapple onto and spark brain activity. The brain can obviously cause its own activity as well.
After that it's just a recursive ETL function via the thalamo-cortical loop [1]. The "self" doesn't necessarily need to live in this loop, but it needs access to the data stream. Inputs trigger neurons/glial that recall past events which all get fed into a bunch of decision making models that spits out new thoughts or decisions which cause us to act. The loop is happening so quickly and chaotically that coupled with randomness, short term and long term memory ... you've essentially got a system to explain creativity and "free will".
Really, consciousness is just an emergent property of a nervous system. It doesn't seem nearly as magical through this lens but that's what makes it so convincing to me.
[1] https://en.wikipedia.org/wiki/Cortico-basal_ganglia-thalamo-...