As I understand it from "Spock Must Die" and "Spock's World," and a couple other novels, including "Fate of the Phoenix," the transporter "memorizes" the person/thing's energy resonances, converts the object into energy and then duplicates it on the planet below.
In James Blish's "Spock Must Die," Dr. McCoy raises the moral question of "Is transporting someone murder?" If someone is disassembled, then there is at least a nanosecond where she does not exist. Under such a situation, she would be dead, and all that is left of the crew member is a sort of soulless zombie walking around on the planet.
In "Spock's World," author Diane Duane shows how transporters can be used for storing food so it won't go stale. You just store the energy patterns of the food, and convert it back into its physical form whenever you want to.
Meanwhile, in "Fate of the Phoenix," the villain Black Omne uses transporter technology to make duplicates of other people (and himself). So, if I go through his transporter, he can now make dozens of me by using another energy source to duplicate my energy pattern -- a sort of immortality, especially if it's done an instant before death.
I'm surprised this hasn't been dealt with more in Star Trek. If you've got a big enough energy source, you can duplicate one person millions of times and send him/them against an enemy force.
Can you imagine what Star Fleet would have been like with a Kirk and Spock on every starship?
There are lot of moral and legal questions can spring up around the transporter
as it works in the series.
Still, in a "Star Trek: The Next Generation" episode, the Enterprise encounters the ruins of an advanced civilization with transporter technology that avoids this problem.
With this civilization's technology, the person to be transported simply steps through a virtual door and emerges on the other side. In a sense, that arrangement would be ideal, as it does not involve duplicating a crew member or destroying
On the other hand, what if the doorway is set
for null coordinates? What happens then? I'd hate to spend the
rest of eternity in transport, in some timeless dimension. Brr. Gives
me as many willies thinking about that as being killed every time I
transport. No wonder McCoy hated the blasted things so much.