Very incomplete answer. Opening a window does little with a major smoking indoors situation. Here's why:
Lower floor rooms in a house or apartment tenants smoke and their rooms filling them with smoke. They turn up the heat in winter and heat from outside rises through their open windows.
Smoke tends to rise up through drafty floors, heating vents, cracks under doors, piping that isn't sealed under sinks and various other ways. An upper apartment will collect both finer smoke particles and especially the most harmful contaminants of secondhand smoke: gases. These include cyanide, formaldehyde, carbon monoxide and acrolein. These gases can and do induce illnesses.
Conversely, a bottom floor apartment will have little to no smoke accumulation. Once the smoke and gases travel up they stay in the upper apartments until the smoke particles are either ventilated or land on surfaces, like bedclothes and furniture. The gases can stay suspended for days, and if the smoker in the lower floor smokes continuously, day after day. These gases and particles compound, making the air in the upper apartments more contaminated than the apartments where smoking is actually taking place.
There is no solution, including ventilation and air purification that can remove smoke if it is continually being replaced by new smoke.
It takes about a year, with windows open, for smoke smell to outgas.
The ONLY way to have smoke-free air inside is to have all smoking outside, away from buildings...children, the ailing, and people who don't wish to have their lungs polluted by other people's smoke.
If this is not possible, non-smokers should choose a ground floor apartment. Non-smokers are less likely to be bothered by neighboring smoke unless the building is completely enclosed., Even then the problem will be more temporary on a ground level because smoke rises.