Trapping moves prevent a Pokemon from switching. Since Gen VI, Ghost type Pokemon can still switch, even when affected by one of these moves.
Anchor Shot
Block
Fairy Lock
G-Max Terror
Ingrain
Jaw Lock
Mean Look
No Retreat
Octolock
Shadow Hold
Spider Web
Spirit Shackle
Thousand Waves
Trapping moves (Bulbapedia)
Binding moves partially trap the opponent, inflict a set amount of damage each turn, and are affected by the Grip Claw and Binding Band.
Bind
Clamp
Fire Spin
G-Max Centiferno
G-Max Sandblast
Infestation
Magma Storm
Sand Tomb
Snap Trap
Thunder Cage
Whirlpool
Wrap
Binding moves (Bulbapedia)