Gills and lungs are richly vascularized organs that serve for gas exchange between the environment and the circulatory system.
Gills are specialised for exchanging gases in aquatic environment whereas lungs carry out gas exchange in terrestrial environment.
The lungs are saclike structures always internal to the organism. Gills are internal or external laminar structures in direct contact with water.
In gills, the water flows in a single direction, and the blood flow in the blood vessels occurs in the opposite direction. Thus optimal gas exchange is achieved. However, to take up oxygen effectively, gills need an enormous surface area, because oxygen is relatively scarce in water. Thus, the gill lamellae are subdivided into extremely thin laminas that are supported in water, but collapse onto each other in air, because of surface tension and gravity.
Lungs comprises paired sacs, with more or less elaborate inner walls for greater surface area, but also with a surfactant substance that decreases surface tension so that these sacs do not collapse. The air goes in and out of the lungs by way of a single duct, thus there isn’t a continuous flow of oxygenated air. Less efficient, but air has so much oxygen that it works anyway.