Pets are creatures that follow the player around. They serve no specific function in the game; they are decorative only. Note that some pets tend to obstruct vision of the player, especially the flying ones.
Some pets are found in dungeon cages, some are dropped by bosses while others are sold by NPCs. All pets can be sold to any NPC trader.