The Dipnoi are a group of sarcopterygiian fish, are are commonly known as the lungfish. Their "lung" is a modified swim bladder, which in most fish is used for buoyancy in swimming, but in the lungfish also absorbs oxygen and removes wastes. Modern lungfish in Africa and South America are able to survive when their pools dry up by burrowing into the mud and sealing themselves within a mucous-lined burrow. During this time, they breathe air through their swim bladder instead of through their gills, and reduce their metabolic rate dramatically. These fish will even drown if they are kept underwater and not allowed to breathe air!
Fossilized lungfish burrows of Gnathorhiza have been found in rocks as old as the Permian, with the lungfish still inside, and older (empty) burrows are known from the Carboniferous and Devonian. The oldest fossil dipnoan is Diabolichthyes, from the Lower Devonian of Yunnan, China. It is not clear whether this particular fish was marine or lived in freshwater like modern lungfish, but both marine and freshwater fossils of other groups are known.
South American Lungfish : Here's a living species of Lepidosiren. If you look carefully, you can see the four slender "fins" of this fish, which are homologous to the four legs of terrestrial vertebrates.
While there are seven families of fossil lungfish known, only two survived into the Triassic (and still exist today). There are only three genera of lungfish alive today and each is found on a single continent. The Australian lungfish is Neoceratodus; in South America lives Leipdosiren; and Protopterus lives in Africa. The largest of these is the Australian species, which may grow to as long as 1.8 meters. Though Neoceratodus today is found only in Australia, fossils of that genus and the related Ceratodus have been found almost worldwide in Mesozoic strata, indicating that this group once had a much wider distribution.
Lungfish are believed to be the closest living relatives of the tetrapods, and share a number of important characteristics with them. Among these characters are tooth enamel, separation of pulmonary blood flow from body blood flow, arrangement of the skull bones, and the presence of four similarly sized limbs with the same position and structure as the four tetrapod legs. However, there is still debate about the relationships among the Sarcopterygii.
We have an exhibit on the Blue Nile Gorge in Ethiopia, which includes images of fossil dipnoans.
Visit the Tree of Life for references and current information on Sarcopterygii phylogeny.