When we yawn, we open our mouths really widely, which will parially close the ear canal on some people, therefore you won't hear as much.There is also that teamed up with the air pressure - you're inhaling a lot of air, which makes a fair bit of noise, therefore you hear the inside 'goings on'.
I don't think we know exactly why we yawn, though one reason would be that we need more oxygen in our blood. This would stimulate energy breakdown and enable us to move more quickly. When we're bored, we breathe more shallowly, thus can create a low blood oxygen level.
Yawning is contagious, too! This may be because when we yawn, it can be a signal to others in the group that there is danger or a stressful situation (dogs yawn when they're nervous) therefore by mimicing the yawn, we spread the message out to the group.