I read a great essay about that a few years ago. The thought experiment went like this: imagine a universe in which a machine scans your atoms one by one, transmits the data wirelessly to Mars, and rebuilds you there, atom by atom. Does your consciousness "jump" to the new body, or do you just die? *
What if the scanner is able to scan you without destroying the original body? What if you accidentally arrive in two destinations? etc...
* Another fascinating question is, we'll assume the new body will be just as conscious as you were. Where does its consciousness "come" from? From its point of view, it was in the teleporter on Earth one moment, and on Mars the next!
I thought the video game SOMA did a nice job exploring this area.