Torment prevents the target from selecting the same move for use twice in a row. If a Pokémon has selected the move it used last turn and becomes affected with Torment, it may still use the move this turn (even if it moves after the user of Torment).
If the target can only use one move (e.g. is holding a Choice item, only has one move with PP, is under the effect of Encore, etc.), the target will be forced to use Struggle every second round. Struggle is not affected by Torment; if a Pokémon has run out of PP for all of its moves, it can continue to use Struggle. Moves such as Rollout will still be fully executed under the effects of Torment.
Torment does not work on Pokémon under the protection of Aroma Veil.
It is TM41, and it is available in the small cave on Route 6 where the player fights Garlikid in versions 1.0.2 and beyond.