A yawn is a reflex consisting of the simultaneous inhalation of air and the stretching of the eardrums, followed by an exhalation of breath.
The ways to prevent yawning are:
1)If you feel a yawn coming on take a few deep breaths through your nose and exhale out through your mouth.
2)If you're in a hot, boring class or work meeting bring a bottle of ice water with you and sip it when you feel a yawn coming on.
3)Stick your tongue to the roof of your mouth.