High pressure air near the surface encourages sinking air.
Air near the surface that is isolated from the atmosphere higher in the sky tends to move slower. This is because the ground doesn't move (other than the rotation rate that both the ground and air are moving at). So the friction of that ground slows air near the surface.
Usually air mixes higher into the atmosphere when it is warmed, because "warmer air rises" (it also mixes from wind turbulence). This is why on average most places have much lower wind speeds around dawn than during the afternoon; most nights see an inversion setup. The natural cycle tends to almost always be that during daytime heating, the heat strongly encourages rising air, which motivates continued "stirring", whereas at night the ground cools, and therefore the near-surface air does too, and the lower levels "decouple" from windier conditions above. This growing layer of disconnect is termed the planetary boundary layer.
Places that are stuck in a long bout of stagnant air often have all three factors at work... high pressure hindering air from rising... the inversion of warm air aloft meaning surface air also again being deterred from rising... and then pollution/fog/low clouds/snow on the ground also preventing more of the sunlight from reaching the ground.
But the sinking air from high pressure is quite often the kickoff factor that helps the inversion\pollution\fog to get building up [note that air that doesn't mix not only builds up pollutants... but builds up moisture too, favoring more fog, especially when solar heating is reduced].
Once the starting conditions are in place, each helps prevent that ground\near-surface air layer from warming (and when it comes to fog\pollution, they tend to move sunlight absorption to the feature, warming that higher layer). Viola, a mean inversion builds up, and it gets stifling.