A frog's lungs are involved in many functions, including breathing, vocalizing and hearing. Brown University explains that frogs use their lungs in the same way humans do to take in air. The breathing process is different, though, because a frog does not have ribs or a diaphragm like a human does, and these body parts help control air flow.
Brown indicates that a frog uses the opening and closing of its nostrils and movements of its mouth to force gases in and out of its lungs. Like humans, lungs are used to breathe out of water, not underwater.
Fermilab reveals that some frogs, such as peepers, also use their lungs to make their characteristic sounds. A frog forces air out of its lungs, but the gas cannot escape because the mouth and nose are shut. Therefore, the air is pushed into a vocal sac in the lower part of the mouth, which expands and vibrates, creating the "ribbit" call.
USA Today reports that frogs' lungs are also involved in their hearing, because their lungs and eardrums are linked by an airway. This connection helps frogs identify the direction the sound came from, because there is a pressure difference between the ear and lung closest to the sound and the organs on the other side.