Amphibians lay their eggs in water, usually in a foamnest. After hatching they are tadpoles, which live in the water and have gills. The tadpoles change into adults in a process called metamorphosis. When they are adult, they have lungs to breathe instead of gills, and legs. Adult amphibians also use their skin to take in oxygen, and some species of salamanders do not have lungs.
The earliest amphibians evolved in the Devonian from lobe-finnedfish which had jointed leg-like fins with digits. They could crawl along the sea bottom. Some had developed primitive lungs to help them breathe air when the stagnant pools of the Devonian swamps were low in oxygen. They could also use their strong fins to hoist themselves out of the water and onto dry land if necessary.