Many ancient fish, together with their surviving relative the lungfish, developed simple lungs which they used instead of their gills when out of the water. Modern lungfish hibernate in a mud cocoon when the pools in which they live dry up. Lungfish can also migrate overland to other pools, using their leg-like fins to help pull them along.
Picture credit: google