A defector was an individual who changed his allegiance from one government or organization to another.
Romulan Admiral Alidar Jarok defected to the Federation in 2366. He had done so believing that the Romulan government was establishing a secret base on Nelvana III as a prelude to an invasion. He believed that the war which would follow had the potential to destroy the Romulan Empire. He defected in order to provide the Federation with the information to prevent such a war by destroying the Nelvana III base before it became operational. He did not realize that the information he had was disinformation fed to him by his government, which suspected that he might defect. Upon realizing this, he committed suicide. (TNG: "The Defector")
In 2349, Ensign Stefan DeSeve of Starfleet defected to the Romulans. He believed that the Romulans had clear moral values and an absolute certainty about what was right and wrong. As the years passed, he grew disillusioned with such a philosophy and returned to the Federation in 2369 to convey a message from the Romulan underground movement and assist in the defection of M'ret and two of his aides. (TNG: "Face of the Enemy")
In 2374, a drunk Quark initially misremembered the word deflector as defector, briefly making the Deep Space 9 resistance movement believe that the self-replicating mines blocking the Bajoran wormhole were going to be disabled with the help of a defector. (DS9: "Behind the Lines")
In 2375, the sixth clone of Weyoun brought Odo to a barren moon in Cardassian space and announced his intention to defect. Weyoun stated that he felt the Dominion's war against the Federation and its allies was wrong, and holding such a view put him at risk of being killed. He offered Odo all the information he had on the Dominion in exchange for being extracted to the Federation. Though Odo did attempt to do that, Jem'Hadar forces dispatched by Damar and the seventh clone of Weyoun prevented it. Weyoun 6 eventually made use of his termination implant to prevent Odo's death. (DS9: "Treachery, Faith and the Great River")
Also in 2375, Kashyk of the Devore Imperium appeared to defect to the starship USS Voyager in the Delta Quadrant in order to assist Captain Janeway with transporting her telepathic crew members and passengers through his government's space. His defection, however, was a ruse designed to expose and capture the telepaths and Voyager. Kashyk, however, was himself double-crossed by Janeway, and his ruse failed. (VOY: "Counterpoint")