Human divers need to resurface very slowly to avoid dangerous 'gas embolisms' which lead to decompression sickness (a.k.a. The Bends).
Deep-diving animals - e.g. whales, dolphins, turtles (and some birds) etc do not suffer the same problems (or very rarely do). There is currently no explanation.
A 2018 paper in Proceedings of the Royal Society B reviews the current research and suggest a possible mechanism.
While exposure to high pressure is a common challenge among breath-hold divers, there is large variation in respiratory anatomy, function and capacity between genera and even species. The ultra-deep-diving feats of some marine mammals go beyond our current understanding of respiratory physiology and lung mechanics."
See : 'Pulmonary ventilation–perfusion mismatch: a novel hypothesis for how diving vertebrates may avoid the bends'
Some birds - e.g. the Thick-billed_murre can dive as deep as 200m. On rapid resurfacing, they apparently suffer no ill effects. A 1992 study published in the ESA journal suggested that such birds may have some special as-yet-unknown lung structure or chemical surfactant at work.
Note: Although not strictly 'diving', it's known that the Nautilus (mollusc) can somehow withstand rapid pressure changes of 80 standard atmospheres (1,200 psi), remaining apparently unharmed when brought to the surface.