Many theories have been put forward about how the brain works.  I subscribe to the late Gerald Edelman's Theory of Neuronal Group Selection.  Many aspects of the TNGS have been demonstrated in "robots" called Brain Based Devices, BBD's.  In the Extended TNGS he creates a biological theory of consciousness, described in his book, The Remembered Present.  A machine with human adult level consciousness will have to be based on the only thing we know creates that," the human brain.  Such a machine is at least 50 to 100 years away.  Before then we may create apparently sentient machines based on the symbolic/connectionist paradigm", but they won't be truly conscious. They may pass the consciousness equivalent of the Turing Test (and the Turing Test at the same time), but as we understand, passing the Turing Test is no more indicative of consciousness than a computer beating the best human players at Chess and Go.