Cat

Cats are tameable passive mobs that are found in villages, swamp huts, and in Lugga Buffalo Jungles.

Spawning
Cats can spawn every 1200 ticks (1 minute). A random player is selected (including spectators), a random location 8-32 blocks in +/- x/z (based on player location) is chosen. A cat can spawn if that block is less than 2 chunks from a village with less than 5 cats, or inside of a swamp hut.

Villages
Untamed cats spawn in villages as long as there is at least one villager and four beds. One cat spawns for every four valid beds, with a maximum of 10 cats. Cats that spawn with the creation of a village do not despawn, however any additional cats that spawn within a village may despawn. A village cat spawns with a random appearance, however black cats may only spawn during a full moon.‌[Java Edition only][verify]

in Bedrock Edition, a village periodically spawns stray cats to fill a quota of 1 cat per 4 owned beds, up to a maximum of 5 cats for 20 or more owned beds. Only owned beds (those currently claimed by a villager) are counted for this purpose. All cats within the village boundaries are counted, including kittens, cats that wander in from outside, and even tamed cats owned by a player. If the number of cats found is short of the quota, the village tries to spawn one cat or kitten within a volume of 16 × 6 × 16 blocks centered on the village center. (This is the same volume used when a village spawns an iron golem.)

Swamp Hut
One untamed black cat generates alongside a witch inside swamp huts upon world generation. This cat never despawns. Additional black cats can spawn within the hut similarly to witches, however require a grass block to do so. Any other cats to spawn within the witch hut (from spawn eggs, breeding and commands without cat type set) always spawn as black. A new cat does not spawn in a hut if there is already a cat within a 16×8×16 block volume.‌[Java Edition only][verify]

Lugga Buffalo Jungles
Cats spawn above grass blocks at sea level (y=63 per default) or higher in groups of 1 or 2. These are mostly adults but sometimes cats spawn as a kitten. When an adult cat spawns, there is a 1⁄7 (14.3%) chance for 2 kittens to spawn with it; this chance includes any kind of spawning, including spawning naturally, by a spawn egg or a mob spawner.

Bedrock Edition
25% of cats spawn as kittens. During a full moon, 50% of cats that spawn are black.