A recent study has shown that yawning helps the brain cool down and allows it to work better. When the working temperature of the brain exceeds the optimal one, the brain yawns to cool it down.
One theory states that we yawn to bring in more oxygen to our lungs in order to breath better. However, other studies have shown that breathing in more oxygen doesn't reduce yawning. This puts that theory to question.
This theory is a combination of the 'cooling the brain' theory and the boredom theory. If you receive too much irrelevant information during a boring lecture for example, then your brain might need to cool down a bit.
If you are receiving irrelevant or boring information, your brain might take a chance to rest for a bit and so yawning might happen. In other words, boring information can lead to yawning.
This is pretty self-explanatory and you have experienced it yourself before.
We sometimes yawn when we believe that what we are doing right now might be less interesting that what's happening somewhere else. Again this supports the theory that yawning happens when we get bored (see also how to know if someone is not interested in you)
Sometimes yawning begins with one person and infects the rest of the group. The brains of the group in such a case unconsciously establish a rapport with the first person who yawned.
We all have cells called 'Mirror neurons' that allow us to experience the feelings of others. When we see someone yawning, our mirror neurons fire up resulting in wanting to yawn.
Yawning is still a puzzling behavior for scientists. While so many theories are available, none of them are considered an absolute fact.
Both stress and anxiety can lead to increased brain temperature and as a result yawning could happen to maintain temperature balance and cool the brain down. This might be the reason some Olympic athletes yawn before a race.
Several studies have shown that we yawn when we are tired. Yawning in such a case might be the brain's own way of getting in more oxygen to the body and improving its functions.
The movement of the jaw that happens while yawing increases the blood flow to the face, neck and head.