nearly all modern cars (in at least the last 20 years) have flow through ventilation that is separate from the HVAC system. No car is fully closed off from outside air.
In the case of Foresters (at least on my SJ 2014 Limited) there is incoming air flow through the dash vents on the outer edge of the dash and the little triangular vents that reside above them. Then in the rear of the vehicle, there are panels (much like what
@whobodym refers to) in the rear panels of the car - down under the cargo area, usually behind the rear wheels on each side... they're a plastic grill with a rubber cover on the outside. This is the exhaust for air in the car... The rubber is designed to seal over the grill to keep air from coming IN (or critters - more on this later).
So when you're sleeping in your car - windows closed - the air will exhaust out of there.
Now the plastic grill and the rubber cover do not really stop critters from getting in as some of those that have posted about mice in their Forester can attest.
A better option would be to buy one of those window vent things that are battery and/or solar powered and just sit on top of the window (when closed) and circulate air in and out of the vehicle. They sell them at WalMart from what I can see.