Purring is part of every cat's repertoire of social communication, apparently created by the movement of air in spasms through contractions of the diaphragm. Interestingly, purring is sometimes heard in cats who are severely ill or anxious, perhaps as a self-comforting vocalization. But, more typically, it is a sign of contentment, first heard in kittens as they suckle milk from their mother.
In adults, purring is heard in domesticated cats when they are petted, and in feral cats during sexual or other social contexts. Like submissive posturing among dogs, purring may be a signal of appeasement to other cats or to people, a way to communicate that the purring cat need not be threatened.
As with many behaviors in dogs and cats, the original presumed purpose of the behavior may not be directly relevant in a pet home. But we do believe that, when our healthy pet cats purr, they are happy and at peace.