Adult frogs have lungs with which they breathe oxygen. They aren't born with lungs, however, and they have other methods to exchange gases. The process of developing lungs, and the way those lungs work, sets frogs apart from other air-breathing animals.
The Tadpole Stage
Once a baby frog hatches out of an egg, the baby is a tadpole. Tadpoles breathe water through gills much like fish do, and as a result, the tadpoles' gills work just like those of fish. Tadpoles breathe in water and force it past their external gills, in the beginning, so that tiny blood vessels in their gills can absorb the oxygen in water and put it directly into the blood stream. At the same time, carbon dioxide exits the gills in the water. Tadpoles' gills will slowly grow over with skin as their lungs develop for use, going from external to internal and at last vanishing completely.
Adult Frog Lungs
Retired biologist John W. Kimball, author of the science textbook Biology, uses this description:
The frog's lungs are a pair of thin-walled sacs connected to the mouth through an opening, the glottis. The surface area of the lungs is increased by inner partitions that are richly supplied with blood vessels.
Kimball explains that frogs open their mouths and _nares_, or nostrils. Second, they close their mouths to trap air inside. Frogs have nostrils for more than just show: They close the external and internal nares third. With the air trapped tightly in this fashion, frogs open up their glottises in their throats so the passages to their lungs are free. Finally, frogs lift the floor of their mouths toward the roof to push the air down the glottis and into the lungs. In a way, they swallow the air to inflate their lungs. The process goes in reverse to remove carbon dioxide from the lungs and expel it from the body. This is termed buccal respiration.
Because a frog's lungs don't inflate and collapse on their own, they are considered poorly developed compared with those of other vertebrates. In fact, the lungs of a frog are not their main method of respiration.
Other Methods of Breathing
Frogs also breathe using their skin and the lining of their mouths. When they use their skin, they are respiring cutaneously. Frog skin is thin and filled with tiny blood vessels called capillaries. These capillaries have the ability to secrete mucus to keep the skin moist. Moist skin is a necessity for frogs out of water because the air diffuses inside the mucus and underlying water and enters the skin through the capillaries. Carbon dioxide diffuses into the air through the same method. Most of a frog's breathing, some 70 perceint of it, happens via cutaneous respiration. The moist lining of the mouth works in much the same way while the frog is out of the water.