A nanite is a microscopic molecular machine, most often used to alter or manipulate the inside of living cells.
Nanites were responsible for the legendary healing properties of the Ilaiyen Archipelago. This nanotechnology had been given to the Ilaiyenai by extra-planetary explorers sometime prior to or during the 13th century. (TOS short story: "As Others See Us")
In 2366, Wesley Crusher experimented with nanites, causing them to evolve into sentience. After threatening the computer core of the USS Enterprise, these nanites were transported to planet Kavis Alpha IV to create their own civilization. (TNG episode: "Evolution")
In that same year, Elias Vaughn and Ruriko Tenmei used trillions of nanites to find and unwrite the code of Cren Veruda's artificial intelligence, which the Borg had found at Uridi'si. (DS9 novel: Lesser Evil)
In 2376, Simon Tarses used medical nanites to treat injuries that Ro Laren suffered after Taran'atar's attack. They were able to limit the genetronic matrix's activity at the molecular level and prevented accidental metastasization. (DS9 novel: Warpath)
Uses of the technology
Passive Recording Devices
In the Mirror Universe, the head of the Obsidian Order possessed among his equipment a miniature particle ejector which contained cylinders of microscopic nanites. The technology was created by the Obsidian Order's research and development team. At the time, Tain did not share any of the secrets of the technology within the rest of the Klingon-Cardassian Alliance or even his own government.
The machine contained cyclinders which were programmable allowing them to set tasks within the thousands of nanites contained within them to serve as passive recording device. They were capable of being remotely triggered at a later time and once they were retrieved, it was possible to gain an entire day's worth of conversations from the machines as they worked together for redundancy. These nanites were capable of recording through tissue from inside the lungs or intestines of a living being with some being capable of clinging to a target's hair or clothes for a day or so. Once loaded into the ejector, it was a simple matter to implant the machine to the users lips. After which, a certain amount of pressure activated the nanites which blew towards the target thus recording everything relating to them.