The Sarcopterygii ("flesh-fin") are the kinds of fish we are descended from. In the Devonian period, known as the Age of Fishes, around 400 million years ago, the seas came to be dominated by three great radiations of fish: the Chondrichthyes (sharks and rays), the Actinopterygii (fish fish: the modern kinds are perch, pike, piranha, plaice, and all the rest), and the Sarcopterygii. Today the sarcopterygid fish are reduced to very few: the two coelacanth species only discovered last century, and the Dipnoi or lungfish, which can survive the drying-up of ponds and crawl over land to get to water. Around four hundred million years ago some such habit became permanent, as the fin bones were developed into four limbs that could support the body in air, without the buoyancy of water. That first tetrapod ("four-leg") gave rise to amphibians, reptiles, mammals, and birds.

The Sarcopterygii are often called lobe-finned fishes, or lobefins, which describes the shape for many of them. The fin is built around a single large bone, as opposed to the ray-finned Actinopterygii where the fins are fans built from thin bony rays. Both taxa are together known as Osteichthyes, bony fish, whereas the more distantly related sharks use cartilage instead of bone. (Some Actinopterygii have also reverted to cartilage.) Though a few kinds of ray-finned fish have experimented with climbing about on land, the big fin bone of the Sarcopterygii is much better suited for development as a weight-bearing limb.

It is not just weight, of course. The spine has to be thoroughly reslung, so that it can move up and down instead of the lateral swing of fish; the relationship between the pectoral girdle and forelimbs, and pelvic girdle and hindlimbs, has to change to accommodate the upward force; the limb bones have to divide into segments to cushion motion; and they need to terminate in feet and toes to spread the load.

Among the many groups of extinct Devonian lobefins, several show some of the necessary innovations. In a group called osteolepiforms there is a creature Eusthenopteron which has the major limb divisions (humerus, radius, femur etc.) and some wrist and ankle bones like those of Tetrapoda. But its limbs were still backwards-pointing, at the wrong angle to work as land feet. Another candidate for near relative to the tetrapods is Panderichthys, which seems to have had something like a crocodile lifestyle, lurking in the shallows and able to see out into the air.

One Devonian lobefin that did cross the border to became a tetrapod, perhaps the first, is Ichthyostega. This had front legs and back flippers, and its head and pectoral girdle were separate, not joined as in fish, so the girdle could articulate with its new forelimbs. It also had ribs in the right way to support an airborne spine. It had seven toes on its back feet (and the front ones have not been found yet), so the now universal pentadactyly is a later innovation among the tetrapods.

Not all sarcopterygians dwell near the surface: today's coelacanths are deep sea creatures. But the transition to air-breathing land-dwellers is the interesting point. Whether they were forced to breathe air and not desiccate because their ponds often dried up, or whether it was the low oxygen content of shallow water that meant they had to take up air-breathing as a secondary device, land-dwellers had to solve not only the mechanical problems of weight and motion, but the three major differences between land and water: breathing air, being dry, and spawning.

Of these, breathing had already been solved. It is now believed that the swim bladders of ordinary fish are not the original from which lungs developed, but the other way round: actually an adaptation of an earlier lung. But gills turned out to be more efficient than lungs for breathing through in water. Once on land, the lungs came back into their own, and the now inefficient gills had to disappear. As is well known, our own embryos still include a gill-bearing stage: "ontogeny recapitulates phylogeny" is not entirely true, but at least in amniotic fluid they cause no harm.

As the waste product of respiration, carbon dioxide, is soluble in water, it is getting rid of this into the air perhaps more than taking in oxygen that gives the advantage to lungs. An impermeable skin is then convenient, as gas exchange with the water is no longer an issue. Not all land-dwellers have permeable skins: the modern amphibians (Lissamphibia, frogs and newts) continue to keep theirs moist with secretions and to respire through them.

The final big problem is to keep the eggs safe. This was postponed. The first land-dwellers were amphibian, returning to the water to spawn as their fishy ancestors did, and of course modern amphibians and fish still do. The innovation of protective inner membranes in the egg, include the amnion, and a hard shell (leathery or rigid) is what marks out the next major grade of tetrapods, the Amniota, the reptile-like creatures giving rise to later reptiles and mammals.

Formerly all Sarcopterygii that weren't Tetrapoda were classed as Crossopterygii, but this is the wrong binary division: Tetrapoda arose somewhere out of the branchings in a diverse Devonian fauna, of which now only the Dipnoi (lungfishes) and Actinistia (coelacanths) survive.

As always, there is only the need for two resources, because they're both so clear and informative:
Colin Tudge, The Variety of Life (Oxford, 2000)
chedcked against The Tree of Life,