Elim Garak was a Cardassian male living in the 24th century, secretly the son of Enabran Tain. As a member of the Obsidian Order, Garak was one of Cardassia's top intelligence operatives, interrogators and assassins. By 2369, he had been exiled to Terok Nor. After the station was transferred to Bajoran ownership and converted to Deep Space 9, he continued to live there as a tailor. One of his greatest personal enemies was Gul Dukat, though Garak eventually fell in love with Dukat's daughter, Tora Ziyal. While living on DS9, Garak became a close friend of Julian Bashir, and had a unique relationship with Odo.
During the Dominion War, Garak was instrumental in the allied war effort as an intelligence analyst. Along with Kira Nerys, he helped lead the Cardassian resistance during the final days of the war, and remained on Cardassia Prime after the Battle of Cardassia. (DS9: "The Wire", "Civil Progress", "Improbable Cause", "The Die Is Cast", "In Purgatory's Shadow", et. al)
During his years as an intelligence operative, and even after his exile, Garak had several encounters with Starfleet Intelligence officer Timothy Sinclair. By the time of Sinclair's return to Starfleet, they had a unique respect for each other, and a friendship of a sort. (Star Trek: Pendragon, "Restoration", "Exile")
Following the Dominion War, Garak served as chief of staff to Cardassian Provisional Government leader Alon Ghemor, a position that included acting as Ghemor's liaison to the military and the Central Intelligence Bureau. Garak found this position frustrating as many in those agencies welcomed the possible assassination of Ghemor. He helped prevent an elaborate assassination plot against Ghemor orchestrated by the True Way.
After a human believed to be Aiman al-Rashid was found to be an agent of Section 31, Deep Space 9 senior officers concluded that a Cardassian with ties to Section 31 had to be feeding this agent periodic instructions if he was a Starfleet-True Way triple agent. Bashir speculated that Garak was this Cardassian agent. (Star Trek: War Aftermath: " The True Way")
In his liaison capacity, Garak also served as Castellan Ghemor's representative in other endeavors, including an archaeological expedition to investigate ancient Hebitian ruins. During this investigation, Garak fell through a dimensional gate where he encountered an alternate version of Skrain Dukat and his daughter, Ziyal Dukat. (Sigils and Unions: Catacombs of Oralius--"Those Who Live in the Shadow of the Night")