This item teaches a Pokemon a specific move, but that move may not work on some pokemon who cannot learn it.

You get one by beating a gym, beating an entity, or defeating the trainers in Elegant Valley. They are also sold in Cinnabar Volcano for Pokedollars, or from Mysterious Grotto for BP.

TM stands for Technical Machine.