Purring in cats first occurs at about one week of age. It serves as a signal to the nursing mother cat that all is well with her babies and that the milk supply is reaching its destination. She, in turn, purrs, letting the kittens know that she too is in a relaxed and cooperative mood. It is believed that purring among adult cats and between adult cats and humans is derived from this primal parent-offspring context.
Contentment is not the sole condition for purring, however. A more precise explanation is that purring signals a friendly social mood and can be employed by an injured cat to indicate the need for friendship. It has been observed that cats in great pain often purr loud and long and can hardly be considered to be contented.
Unlike our small domestic cats that purr with both inward and outward breaths (with their mouths firmly shut), their large cousins--the lions and tigers, can only sputter out a friendly "one-way purr" when greeting friends. However, the big cats have a feature that compensates for their inability to purr--they can roar! (Something our miniature housebound tigers would undoubtedly love to do.)