Pets are dropped by enemies in the form of eggs, often in the egg basket. (They can also be purchased for Realm Gold.)
Eggs come in fourteen families (and the Mystery variety) and four rarities. Once acquired, eggs can be taken to the Pet Yard and hatched. Hatching an egg produces a random pet of the specified rarity, with three potential abilities.
You can find a list of Group Drop Locations and Dungeon Eggs: [here]