Purring comes from rapid laryngeal muscle vibration, and purring while relaxed and petted genuinely correlates with contentment, its best-known face.
Yet purring is also documented on exam tables, after injury, and even near death; a leading explanation is self-soothing, akin to nervous humming in people.
Judge the whole picture: a loose body and slow blinks with purring mean relaxation, while purring with tension, hiding, or fast breathing warrants concern.
Persistent purring in unfamiliar settings or alongside physical abnormality should be checked as a pain or stress signal with a vet, not assumed to be joy.