If we could solve this today we would already be well on the way immortality! But there are some theories, the most prominent of which is a Moravec Transfer[1]:
> A neuron-sized robot swims up to a neuron and scans it into memory. A computer starts simulating the neuron. The robot waits until the neuron perfectly matches its simulation inside the computer, and then replaces the neuron with itself as smoothly as possible, sending inputs to the computer and transmitting outputs from the simulation of a neuron inside the computer.
> This entire procedure has had no effect on the flow of information in the brain, except that one neuron's worth of processing is now being done inside a computer instead of a neuron. Repeat, neuron by neuron, until the entire brain is composed of robot neurons whose guts are inside the computer.