The reflex that makes you open your mouth wide, inhale, and then exhale is called a yawn. Even seeing photos of other people's yawns (or reading the word yawn) can make you yawn.
We yawn when we're very bored or tired, or when our bodies need an influx of oxygen. Scientists aren't completely in agreement about all the reasons why we yawn, but the "contagious yawn" happens across all human societies and even in non-human animals like chimpanzees and dogs. Things can also yawn in a figurative way, when they're open wide. Yawn comes from gionian in Old English, "open the mouth wide."