A Technical Machine, or TM for short, is an item that is used to teach a Pokémon a move. A Hidden Machine, or HM for short, also teaches a Pokémon a move, but HM moves are generally used to clear obstacles or for transportation.
TMs and HMs can be found in a variety of places, such as lying on the ground or bought at department stores. Some TMs are also given away by Gym Leaders as prizes for defeating them.
All HM moves and some TM moves can be used in the field by a Pokémon even if the Pokémon has fainted during battle or has run out of PP (using these moves in the field does not consume PP). Specific Badges must be obtained by the player before they can use an HM move outside of battle.