Spider Web is a trapping Bug-type move.
Spider Web prevents the target from switching out or fleeing (including via Teleport). It bypasses accuracy checks to always hit, unless the opponent is in the semi-invulnerable turn of a move such as Dig or Fly. Spider Web's effect only applies as long as the Pokémon that used it remains in battle.
The affected Pokémon can still switch out via Baton Pass, but in that case, the Pokémon that switches in will now be affected. If a Pokémon traps a target with Spider Web and then switches with Baton Pass, the target will no longer be trapped.
If a wild Pokémon uses Spider Web on the player's Pokémon, the player will be unable to escape, unless the player's Pokémon is holding a Smoke Ball.
Pokémon affected by Spider Web can escape if the Pokémon has the Ability Run Away.
Spider Web does not affect Ghost-type Pokémon.
Pokémon that learn Spider Web
By leveling up