Air pollution is a nuisance in many places and a major public health problem in some. It's usually due to pollutants caused by fires, farming, or pollutants in the city itself, like large numbers of cars or factories. It is especially common in big cities and is worsened when air is dry and stagnant.
Air pollution results from a combination of factors, often human-related, that create hazy skies — or worse — in large cities or metropolitan areas. For most people, air pollution, unless it reaches unusual levels, is not dangerous but can be unpleasant. Pollution in cities tends to build up during weekdays, hitting a maximum before the weekend. Air pollution problems are often worsened by specific geographic features and environmental conditions such as inversion (a warm layer of air sitting atop a cold layer of air and thus "blocking" all air beneath it from rising). This results in the polluted air being trapped, allowing it build up to worse, or even dangerous, heights.
The pollution problem can be seasonal, such as when inversion is common some part of the year, winds bring in clean air at other times, or when a significant part of the problem is pollution from heating or from pollutants bound by snow in the winter and released in spring. The effects may also depend on the dryness of air. Where air pollution is a problem, you might want to check when to travel there.
Smog is severe air pollution, resembling fog, that can occur in big cities, especially those with poor environmental protection, and also sometimes in suburban or rural areas near heavily-polluting factories, electric plants and refineries. Smog at best will only reduce visibility and gray the sky; at worst it can disrupt your breathing system and can cause death as you breathe pollutants into your body.
Some websites have information about smog in your area; these include Purpleair (global, with varying levels of coverage) and Airnow (USA, Canada). The data is mostly from national agencies, which may provide the same data, or data that the global sites do not show, together with a locally relevant discussion.
If smog becomes especially severe or you have breathing problems, it is unwise to get out and travel; if you have to, wear an N95 mask or an extra piece of clothing to cover your nose and mouth. Look out for weather advisories in the media or out and about. If you're planning a longer stay in a smoggy city, consider buying an air filter.
Visitors with asthma or other medical conditions might be affected even by mild air pollution. When it gets severe, people might be advised to stay indoors.
Cities might restrict driving and electricity consumption to combat high air pollution. For instance, in some cases people are restricted from driving on some days of the week depending on their license plate number. In some cities, there might be cheaper or entirely free public transit tickets on "smog days" to entice people out of their cars or give an option when driving is forbidden. While some places have taken drastic measures to combat smog in recent years with positive results, in places like China, Mexico City or Los Angeles, smog is still a major problem.