If you learn of the passing of a friend's pet, it is certainly acceptable to send a condolence card or make a sympathetic phone call. Such gestures are usually welcomed by grieving owners. You might also offer services, such as taking them to a pet store yourself when they feel ready to look at another pet. Children respond well to stories told by adults who understand what they're experiencing, so feel free to share a story of loss with the child. Tell them how you learned to cope with your loss, and what happened when that next pet came into your life.
Children especially look for signs of hope during a tragedy, so provide some.
Assure them that the world will go on, and their pet is in a much happier place now. There is not one standard method for dealing with the loss of a family pet, so don't expect to find one. The circumstances of your pet's death can vary from sudden and unexpected to planned and necessary. Each circumstance brings a different set of emotions with it, so be flexible in your response to a grieving child's questions about their pet. Above all, allow plenty of time for recovery for all involved.