Prior to version 1.6, all ground passive mobs (not squid) will spawn at light level 9 or above on grass blocks.
From version 1.6 onwards they will spawn on grass at any light level.
Squid will spawn at any light level under water.
Groups:
Pigs spawn in groups of 3-4 Sheep spawn in groups of 2-8 Cows spawn in groups of 4-12 Chickens spawn in groups of 1-3 (and a 1/8th chance from a thrown egg)
gaming.stackexchange.com/users/4012/Ronan
The Minecraft Wiki shows that there are many variables that affect animal spawnings as of version 1.3.2.
One in ten newly generated chunks will contain mobs (includes any animal, monster, or utility).
They can show up in as many as four 'packs' of the same mob.
They will always spawn on the highest point (the blocks that you see if you were flying).
Therefore, if the world generator had to choose between spawning an animal on a ledge or inside a cave, it would choose the ledge.
The block that the animal spawns on must be opaque (not glass, water, lava, etc).
Pigs spawn in groups of either three or four.
Sheep spawn in groups of two to eight.
Cows spawn in groups of four, and can spawn up to twelve.
Chickens spawn in groups of as much as three.
When chicken eggs are thrown, there is a 1/8 chance of a baby chicken spawning.
There is also a 1/32 chance of four spawning instead of one.
Before version 1.6, they only spawned when the light level was over nine, now they spawn regardless of whatever light level.
The block two blocks above the opaque block must be non-opaque (tree leaf, water, lava, glass).
Animals (excluding squid) do not spawn in ocean biomes.
No animals normally spawn in desert biomes.
The spawning of animals is dependent on the world seed .
This means that if I make a world with default settings and the seed 'minecraft' and you do that same, the cows and pigs will spawn in the exact same places.
Very rarely, new animals can spawn in already generated chunks, like monsters.
When this happens, as well as when mobs spawn from a mob spawner, the following rules apply: The light level must be nine or more.
The opaque must be a grass block (not a dirt block).
Unlike monsters, animals do not spontaneously despawn, except for wild ocelots and wolves (which can despawn only when they are hostile).
They do not despawn even if the player is far from them.
Note that squids have different spawning criteria then other mobs.
They can spawn at any light level underwater.
They will also spawn in player made pools and sometimes they will spawn in underground water deposits.
It is technically possible for them to spawn in one block of water, but that is not very likely.
gaming.stackexchange.com/users/None/
In Addition: Animals, and Monster-Mobs too, ONLY Spawn a few 100 blocks around human Players.
Animals only Spawn on dirt blocks and cobble stone
gaming.stackexchange.com/users/6345/WeGi
The wiki has a good overview, but the key points are as follows: Passive mobs don't despawn when they are far from the player, except for angered wolves and ocelots (which by definition are not passive).
Passive mobs are spawned on chunks that have just been generated.
They spawn above the highest opaque block that has at least 2 transparent blocks above it.
Passive mobs also have the chance to spawn on existing chunks, but at a much reduced rate compared to hostile mobs.
Passive mobs need a light level of at least 9 and a grass block to spawn in this manner.
Animals other than squids will not spawn in ocean and desert.
Obviously, squids only spawn in water, which generally means ocean.
gaming.stackexchange.com/users/1351/MBraedley
I learned that squid can spawn only in water, but it will take about 5-10 days (in the game).
Squid can spawn in even 1 block of water.
gaming.stackexchange.com/users/36120/jessiem
Animal spawning is always slowly changing.
Clarify some points: Animals will not spawn in the spawn chunk (where you spawned)
Animals will not spawn within 16 blocks of a player - Monsters will not spawn within 22 blocks of a player, but once they move closer than 22 blocks to the player they cannot despawn.
Nothing will spawn further than 128 blocks from the player.
Despawning varies depending on the mob.
Monsters despawn instantly if they spawn more than 82 blocks from the player.
This is all SPHERICAL - meaning in the caves below you, platforms above you,and in any direction.
As of 1.13 squid only spawn in river & ocean bioms between levels 62 and 46.
(however, I was unable to build a working squid farm in a mushroom island biom in 1.12.2)
Before 1.13 they can spawn in any water, 1 block or larger, between levels 46 and 64.
There is a mob cap, a maximum limit that can be in range of the player.
Once that cap is reached more mobs will not spawn, friendly, neutral or hostile.
Each has it's own cap not affected by the other.
HOWEVER, placing animals in pens or naming them takes them out of the cap count, and so does killing them, obviously.
You can breed as many food mobs as you want (see Mumbo's chicken farm in season 4 of Hermitcraft) and they will never despawn if penned, named, or otherwise enclosed.
Hostile mobs can only spawn in light of 7 or less.
Once spawned, all hostile mobs can survive in any artificial light of any level (torches, lanterns, etc..)
Fun Fact: Hostile mobs can spawn any time day or night on blocks placed at level 256 because technically there is no light above 256 to light the top surface.
So in short the OP was correct that spawning was centered around a player.
Verification of this information can be done in the official wiki or watching Let's Play videos for Skyblock Challenge.
gaming.stackexchange.com/users/241659/Dave Sunhammer
In what way do animals in Minecraft spawn? It looks to me that they spawn more during the night (but where there are torches) and more kind of around you / around some other human player. Am I right, or does it work some other way?  Thank you.
How does animal spawning work?
gaming.stackexchange.com
<minecraft-java-edition>
gaming.stackexchange.com/questions/15207
gaming.stackexchange.com/users/6377/pootzko
All ground passive mobs with spawn on grass at any light level. Squid can spawn in water, in 5-10 days. While in the past passive mobs spawned at light level 9 and above, now the spawn on grass whatever the light level. Squids spawn in water and all animals spawn within a few 100 blocks around the player.
Users list different criteria for mob spawning.