Arena Trap prevents fleeing or switching out as long as the user remains in battle. If the user switches out, the affected Pokémon can switch out or flee in the next turn. Flying-type Pokémon and Pokémon with Levitate are immune to the effect of this ability. Run Away will also negate its effect, but only in a wild Pokémon battle.
Outside of battle
From Pokémon Emerald onwards, if the Pokémon with Arena Trap is leading the party, then Arena Trap causes wild Pokémon to appear 2 times more often.
Please note that this is only 100% accurate to Generation VII games.
For Generation III games, ignore Abilities introduced in Generation IV or later and Hidden Abilities.
For Generation IV games, ignore Hidden Abilities.
For Generation V games, ignore Abilities introduced in Generation VI or later.
For Generation VI games, ignore Abilities introduced in Generation VII or later.
In the anime
Trapinch. Trapinch digs a circular pit underground, hides at the bottom and covers it up. When an opponent steps on the ground above Trapinch, it collapses, revealing Trapinch and causing the opponent to slide down the edges of the pit toward Trapinch. The collapsing ground at the sides of the pit prevent the opponent's escape.