The unfolded "pages" (plates) of the book lung are filled with hemolymph (the arthropod blood). The folds maximize the surface exposed to air, and thereby maximize the amount of gas exchanged with the environment. In most species, no motion of the plates is required to facilitate this kind of respiration.
The oldest book lungs have been recovered from extinct trigonotarbid arachnids preserved in the 410 million year old Rhynie chert of Scotland. These Devonian fossil lungs are almost indistinguishable from the lungs of modern arachnids.
The absence or presence of book lungs divides the Arachnida into two main groups, but says nothing about the relationships between them: the pulmonate arachnids (book lungs present; scorpions, whip scorpions, Schizomida, Amblypygi, and spiders), and the apulmonate arachnids (book lungs absent; microwhip scorpions, harvestmen, Acarina, pseudoscorpions, Ricinulei and sunspiders). One of the long-running controversies in arachnid evolution is whether the book lung evolved once in the arachnid common ancestor, or whether it evolved in multiple groups of arachnids in parallel as they came onto land.
Book lungs have evolved from book gills. Although they have a similar book-like structure, they are found in different locations. Book gills are found externally while book lungs are found internally. Book gills are still found in horseshoe crabs which have five pairs of them, the flap in front of them being the genital operculum which lacks gills. Book gills are flap-like appendages that are designed for gas exchange within water and seem to have their origin as modified legs. On the inside of each appendage there are attached over 100 thin leaf-like membranes called lamellae which appear as pages in a book, and are the areas of the gill where gas exchange takes place. These appendages move with rhythmic movements to drive blood in and out of the lamellae and to circulate water over them. Respiration being their main purpose, they can also be used for swimming in young individuals. If they are kept moist, the horseshoe crab can live on land for many hours.