A transporter is a fictional teleportation machine used in the Star Trek universe. Transporters convert a person or object into an energy pattern (a process called dematerialization), then "beam" it to a target, where it is reconverted into matter (rematerialization). The term transporter accident is a catch-all term for when a person or object does not rematerialize correctly.
According to The Making of Star Trek, Star Trek creator Gene Roddenberry's original plan did not include transporters, instead calling for characters to land the starship itself. However, this would have required unfeasible and unaffordable sets and model filming, as well as episode running time spent while landing, taking off, etc. The shuttlecraft was the next idea, however when filming began, the full-sized shooting model was not ready.
Transporters were devised as a less expensive alternative. Transporters first appear in the original pilot episode "The Cage". The transporter special effect, before being done using computer animation, was created by mixing glitter with water, then agitating the solution and incorporating it into special camera effects.
Gene Roddenberry in 1964 had not seen The Fly upon his first draft of "The Cage", but it was brought to his attention, and this is how the transporter was considered. According to the Star Trek: The Next Generation Technical Manual, the three touch-sensitive light-up bars on the Enterprise-D's transporter console were an homage to the three sliders used on the duotronic transporter console on the original Enterprise in The Original Series.