The 'touch-move' rule is [particularly] used in live 'face-to-face'-type (OTB [Over The Board]) tournament- and/or match-format play. Its use is less common in most formats of internet-chess. It most likely evolved not only from 'formal'- or serious-level game play involving high stakes, but more due in part towards the deterrence for 'analysing [positions] over the board' during actual game play. The ruling stipulates: If a player intentionally [or unintentionally] touches a piece when it is their turn to move, they must move or capture that piece, only if it is legal to do so. Once a player has released one's hand from the piece that was touched/moved, the player may not retract that move back - the move [or capture] must be made, if possible. There is no penalty incurred if the piece touched/moved cannot be realized. A player may not touch any piece on the board if it is not their turn to move - otherwise doing so may incur a penalty from the tournament director.
The only other exception to this rule is if the player is adjusting a piece. Piece adjustment is the right for a player [on the move] to correct the placement of any piece[s] 'in doubt' of their current game position over the course of play. A player may 'adjust' [at will] any number [and colour] of pieces not centered on their designated squares. When a player adjusts they must clearly say "I'll adjust" [or "j'adoube"] before actually touching the piece, then places [adjusts] the piece back to its original game position. After all satisfaction of piece adjustment, the player then makes their move [of any piece - adjusted or not] accordingly.