It doesn't the species just dies, it's called survival of the fittest for a reason, the weakest die while the animals more suited to the environment live on and produce offspring therefore passing on its genes.
I have oversimplified it a bit but if you want more details use Google.