Each battle that you win will yield experience for each pet that participated. However, deceased companions will not receive any experience (so make an effort to keep them alive by swaping in a different pet). Experience gains are based on your pet's level compared to the wild pet. Defeating a higher level opponent will grant more experience than a much lower level one, but be ready for a tough fight!
Learned this today: posted a comment, came back later to see if there was any feedback, reloaded the page: the page posted a copy of my comment. That was not what I wanted. I just wanted to check if my comment was posted and if there were some responses. I did not want to post a copy of my comment from 5 hours ago. And, a humble guess, I think the majority of the users are not expecting such behavior either.