Do cars generate more pollution when stationary compared to say moving at 40mph?
Yes and no.
Pollution is a nebulous term.
A moving car disperses particulate matter more widely than a stationary one and consumes more energy in the act of moving, so generates more CO2. A idle engine, or slow moving vehicle which is usually a result of congestion and greater concentration of vehicles will still emit CO2 and particulates, but the particulates will be concentrated within the locality, CO2 diffuses more readily, and doesn't cause respiratory problems. Hence the concern with particulates from inner city congestion causing a suite of diseases and adverse developmental impacts on kids. Rural locations have less congestion so particulates are dispersed more easily. Particulates can be 'washed' out of the atmosphere by weather, but CO2 is another matter. It is a greenhouse gas that forms a blanket around the planet which traps the sun's radiation, heating the sea, land and air. We will all feel the effects of CO2 with warming climate, extreme weather events, water shortages and crop failures long after the last car stops polluting. Particulate pollution is the preserve of urban environments, and those burning dirty fuels indoors.