Regenerator restores 33% of the Pokémon's maximum HP upon switching out. This includes through the use of moves that switch the user out, such as Baton Pass and Volt Switch, and moves used by opposing Pokémon that force it to switch, such as Whirlwind and Dragon Tail.
This effect will occur if Regenerator is the Pokémon's Ability in battle when it switches out and is not suppressed; a Pokémon that obtained the Ability with Trace or Role Play will restore HP when it switches out, whereas a Pokémon which has Regenerator but has been affected by Gastro Acid will not. Heal Block does not prevent Regenerator from restoring HP.
Outside of battle
Regenerator has no effect outside of battle.