First you build a computer that has all the equations for the natural world. Then any assembled group of atoms in that world would act like they would in the 'real' world.
Then you get a momentary scan of a person, knowing the state of every atom, and its electrical charge. And you simulate it in the computer. After some time in the computer, you then read the data of every atom and every electrical charge, and beam that back into real world by atomic assembler like a replicator that translates the state in the computer back to real state.
Where it gets weird would be you are actually making a copy, and that copy can have experiences in the computer, then beamed back out and relate them to the real world, but there would then be two of the same people.
There was a great Outer Limits episode about balancing the equation on that phenomenon. It answers your question on the extra copy outside the system after transition.
http://www.hulu.com/watch/69830/outer-limits-think-like-a-dinosaurI have a few short stories thought up on that topic. For instance, if such a world could be created, then all resource issues and population issues would be solved. But would people think it is a real existence?
It is a very common metaphor for existence, and can allow for easier thought on the supernatural, but it has failings by making the supernatural the same as the human experiance.