There are multiple ways to heal your battle pet(s), some of them heal specifically the active pet, others heal all pets. Here are the different ways you can heal:
Winning a battle
Winning a battle will provide a small heal and some experience to your currently active battle pet. The amount healed is 50% of the damage that they took during the fight.
Levelling a battle pet
Gaining a level with a battle pet will restore its health to 100%.
Visit a stable master
For a small fee (from my testing this appears to be 10 silver and doesn't appear to increase the more times you do it) you can ask a Stable Master to revive and heal all of your battle pets.
The battle pet interface
You can also use the 'Revive Pets' option in the Battle Pet interface:
This ability has an eight minute cooldown, and fully revives and heals your battle pets.
Battle Pet Bandages
It is also possible to get battle pet bandages, which are bandages for your battle pets. These will heal and resurrect your battle pets to full health.