Cats purr by the rapid contraction and relaxation of the muscles in their larynx (voice box). This causes the vocal cords to separate, allowing air to pass through, creating the purring sound. Purring is often associated with contentment, but cats may also purr when they are in pain or anxious.