This question was inspired by the most creative thing ever to come up in a movie, namely the transfer of a consciousness from one body to another (may it be biological, or via non-biological methods).
I have always thought of consciousness as the result of a neural network communicating with the various parts of the brain, which in turn stores all of our experiences, thereby giving meaning to the sensations we perceive through our sensory organs that may aid in self-sustainability.