Consciousness can be understood by first you looking at how neurons work. Neurons use up to 90% of their metabolic; ATP, energy pumping and exchanging cations; Sodium and Potassium ions. The end result is Sodium ions accumulate on the outside and Potassium accumulated on the inside of neurons. This creates concentration gradients of ions across the membrane; chemical potential. Since Potassium ions can more easily diffuse across the membrane, some follow the concentration gradient; try to balance potassium on both sides This creates a membrane potential based on charge differences; more positive outside.
When neurons fire and our memory becomes conscious, neurons are lowering these potentials. The irony is rest neurons contain the most energy; top of an energy hill. The active firing lowers this energy; sliding down the energy hill. This schema is useful, since if neurons gain too much energy, they will spontaneously fire to lower their potentials; brain waves.
Besides energy, there is also some important entropy considerations. The 2nd law states that the entropy of the universe has to increase. Things need to move toward higher entropy and complexity. When neuron expend energy, climbing the energy hill, the segregation of cations lowers the neuron entropy against the 2nd law. In other words, left to their own devices, these two cations would prefer mix and blend to form a uniform solution; direction of increasing entropy and 2nd law. Segregation, which takes energy, is moving the cations in the wrong direction, creating an entropic potential; based on loss entropy.
This energy and entropy platform is where consciousness comes in. Consciousness has a connection to the entropy increase needed to overcome the action of individual neurons, which amplifies the entropic potential of the brain. Since neurons are wired in networks; dendrites and axons, the needed entropy increase, due to firing is more spread out among the network, causing an integrated entropy increase brain wide.
The 2nd law requires that entropy has to increase over time. The network platform of branches and synapse has to evolve into states of ever increasing complexity; 2nd law driven learning potential. This also appears as more hardware; more branches and more complex wiring for synapses, as well as more complex paths for ionic flow, all designed to increase the global brain entropy. This appears to us a conscious awareness and learning potential that evolves with time. Spontaneous ideas and impulses can form within the increasing entropy of our memory.
All cells pump and exchange cations to various degrees. These same principles of entropic learning potential apply even to single cellular organisms. Multicellular animals take this to another level having specialty cells; neurons; which generate the highest membrane potentials and which also form complex networks to release the potential and increase complexity.