They are resurrected in a different body. You have to take really good care of your pet into old age for that to happen.
The game instructions say:
Quote:
If your pet lives to old age, and dies happy, he may choose to come back and live with you again. When this happens a RESURRECT button will appear on the DEATH screen.
If you are lucky enough to have a pet who wants to come back, he will be resurrected with a NEW LOOK but the SAME MIND. Most importantly though you will be able to IMPROVE SOMETHING about him permanently.