Although the Battle Pet Trainer will only offer to teach you your race-specific companion, it is possible to add all of these pets to your collection. You can either find them in your faction’s auction house or you can create a character of the race whose pet you would like to learn. Using your new character, you can seek out any battle pet trainer in major cities. After you learn the pet, you can delete the character; the pet you learned will not be removed from your collection.
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!