First, buy a toy, then select the pet you want to make happy. Then go to your inventory and click on the toy, and click Use Item.
Different toys can make your pet happier than others. On the item deion it will say "This item will give an effect of 2 happiness" or something like that. Items that give 2 happiness or will make your pet Delighted; items that give 1 happiness will make your pet Joyful.
I don't think pets get happier than Delighted.