Combustion (in a fireplace, gas heater, candle, oil lamp, etc.) consumes oxygen while producing carbon dioxide and other unhealthy gases and smoke, requiring ventilation air. An open chimney promotes infiltration (i.e. natural ventilation) because of the negative pressure change induced by the buoyant, warmer air leaving through the chimney. The warm air is typically replaced by heavier, cold air.
Ventilation in a structure is also needed for removing water vapor produced by respiration, burning, and cooking, and for removing odors. If water vapor is permitted to accumulate, it may damage the structure, insulation, or finishes.  When operating, an air conditioner usually removes excess moisture from the air. A dehumidifier may also be appropriate for removing airborne moisture.