@Grimm: There's no actual, like....system to it. Battling in any form, whether catching, legitimately beating up wild pokemon, watching someone else battle, or furiously trying to slow down a giant Nidoking from killing you, will gain experience. I'll leave the actual judgement to you guys.
EDIT: OH GOD WHAT HAPPENED TO THAT POOR BEAVER BIDOOF! He's so...battle-hardened!