Activating the glitch.
The invulnerability glitch, also known as God Mode glitch is a natural glitch in Pokémon Red, Blue, and Yellow.
If a Pokémon becomes fully paralysed while under the invulnerable stage of Fly or Dig, all moves (with the exception of Swift, Transform and possibly the unleashed damage from Bide) from the opponent will miss or fail until the user switches Pokémon, finishes the battle or successfully performs Fly or Dig. The user's Pokémon can attack normally during this glitch.
This glitch was fixed in Pokémon Stadium.