These are the moves that prevent fleeing and switching:
Bind
Block
Clamp
Fairy Lock
Fire Spin
Infestation
Magma Storm
Mean Look
Sand Tomb
Spider Web
Whirlpool
Wrap
These are the abilites which prevent exit from battle,but some conditions have to be met before they can activate.They are:
If the opponent is of the Steel-type, Pokémon with the Magnet Pull ability prevent them from exiting battle
If the opponent isn't of the Flying-type or doesn't have the Levitate ability, Pokémon with the Arena Trap ability prevent them from exiting battle
If the opponent doesn't also have this ability and isn't a Ghost-type, Pokémon with the Shadow Tag ability prevent all opposing Pokémon from exiting battle
If the Pokémon has the Suction Cups ability, the Pokémon cannot be forced from battle
Source:Serebii.