Creatures (and plants) are generated for regions, and only a random set of those legal to the biome(s) in the region are actually present, for a start, with numbers for the populations (except vermin and plants, which are innumerable. In addition to that an embark gets generated with a list of creatures (and plants, again) drawn from a 7 * 7 world tile area centered on the embark's world tile each entry in this list also has numbers associated to it. This list is what the DFHack command region-pops uses.
What you actually get in your embark depends on what's available in the regions present in your embark, which is a subset of the 7 * 7 list. I don't know if DF allows migration from one region to another when both regions support the species and have it selected as available (if both of these conditions aren't met migration should not occur).
Each cavern level has its own set of regions, and those region boundaries have the same shape as the surface ones on the in game tile level (the 2 * 2 meter tiles), but the world tile association of regions aren't the same for the surface and each cavern: they're all different.
You can drive species to local extinction, which seems to be a particular problem for glaciers and yetis, as glaciers have rather few species, so all critters arriving are drawn from a rather small pool of species with limited numbers.
I don't know if species go extinct during world gen: they're most probably not allocated to the region in the first place.
End of rambling...