When you are huffing and puffing after running around, you have to breathe through your mouth, right? Sucking air through your nostrils doesn’t get you enough oxygen. Well, frogs breathe through their nostrils for the same reason — when they’re hopping around on land they can’t get enough oxygen through their skin alone.
Frogs are amphibians, which means that they spend part of their life in water, and part of their life on land. They begin life as tadpoles, taking in oxygen through their skin and through their gills. When they turn into adult frogs, they grow lungs and lose their gills, but continue to constantly breathe through their skin.
During periods of inactivity, including hibernation, frogs don’t need as much oxygen. At these times, they only breathe through their skin, which dissolves oxygen in water or air through a thin layer of moisture. But when a frog is leaping around eating bugs, it needs to be able to use its lungs to catch its breath.