Espionage, or spying, is the clandestine practice of gathering information on an opposing state, organisation, or group. Individuals charged with carrying out acts of espionage are known as spies, and their duties sometimes extended to acting upon the intelligence they gathered, in acts of sabotage for example. Spies sometimes used subterfuge to achieve their goals, such as taking on a false identity, sometimes to the extent of undergoing cosmetic surgery.
In 2267 the Klingon occupation force on Organia suspected Spock might be a Federation spy, but after subjecting him to their mind-sifter were confident in his story of being a trader. When it was later revealed Spock and James T. Kirk (who had been disguised as an Organian) were in fact Federation operatives the Klingons branded them spies and terrorists. (TOS comic: "Against Their Nature")
The incident on Organia resulted in the formation of the Organian Peace Treaty, which forbid the Klingons from direct military action against the Federation. In response the Klingon High Council looked for new tactics, and turned to espionage. A Klingon named Gralmek was recruited by Klingon Intelligence for the first mission to infiltrate the Federation's Planetary Development Corps. For the mission Gralmek underwent extensive cosmetic surgery to alter his appearance to match that of Arne Darvin. Once Gralmek's physical alteration was complete he was trained to act as a Human and was then sent into Federation space to begin his mission - starting by killing the real Arne Darvin and assuming his place as assistant administrator to Nilz Baris, who was overseeing Federation efforts to colonize Sherman's Planet. Gralmek's eventual goal was to poison a shipment of quadrotriticale which would result in the Federation colony failing, paving the way for the Empire to more successfully develop the planet, and claim it, under the terms of the treaty. Gralmek's mission ultimately failed thanks to the unforeseen intervention of tribbles, and the shamed High Council cancelled their plans for a more extensive espionage program. (TOS comic: "Beneath the Skin")