TM's (or Technical Machines) are items that allow a Pokémon to learn certain moves.
The TM must be compatible with the Pokémon for them to work.
 History of TMs
When the first Pokemon games came out, TMs were usable one-time only before being disposed of. One way around this in Generation I was the Missingno Glitch, where running away from Missingno or 'M (a similar Glitch Pokémon) multiplied whatever item was in the 6th Slot of the Trainer's Bag.
Generation II introduced breeding, which was a way to pass on a TM-learned move, but this could be very time-consuming. With the addition of the Pickup Ability in Generation III, some TMs could be found on rare occassion by the Pokémon with the Ability, but only after said Pokémon passes Level 51.
This would continue in Generation IV, but an entirely new mechanic was thrown into the TM mix for Generation V: TMs could now be used again and again without having to be disposed of after one use. However, as a result, the Pickup Ability no longer collects TM's at random, instead picking up a Prism Scale on the rare conditions in which a TM would have been found in previous games.
For Generations I-III, there would only be 50 available TMs, many of which changed from generation to generation. Starting in Generation IV, the number of TMs available increased from 50 to 92. Three more TMs were added for Generation V, bringing the total number of TMs available up to 95.
Related ThreadsPokemon TM Guide By Pokemonrayqauza - last post by @ Jul 19, 2011
TM/HM Guide - last post by @ Sep 13, 2003
TM/HM Guide - last post by @ Sep 7, 2003
Stuck at receiving Dig TM! - last post by @ May 16, 2011
TMs of secrecy - last post by @ Aug 2, 2010