In battle
Regenerator restores ⅓ of the Pokémon's maximum HP upon switching out or completing a battle (if it was in battle at the end of the battle).
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 will restore HP when it switches out, whereas a Pokémon which has Regenerator but has been affected by Gastro Acid will not.
Outside of battle
Regenerator has no effect outside of battle.