Bad air is just slang.
Old Mines have a tendency of harboring toxic gas that leaks into the mine and collects over time. Sometimes you can smell it, but most of the time you can not. Pretty much all land will have some gas seepage. This is normally of no concern since even the smallest breeze will send it on its merry way. Mines do not generally have air flow. No airflow means that the gas is not blown away. And with many of these gasses being heavier then O2 they push fresh air out.
The same thing happens to cave divers. There is a video (Go Pro style) of a diver coming up into a air pocket and spitting out his regulator. He takes one breath, passes out and dies from drowning. It all takes less then three seconds.