Friction's effects on air motion decrease as the altitude increases -- to a point (usually 1-2 km) where it has no effect at all. The depth of the atmosphere that friction does play a role in atmospheric motion is referred to as the boundary layer. Within the boundary layer, this friction plays a role in keeping the wind from being geostrophic.
If we look at low and high-pressure systems, we can see this mechanism at work. Here in this exmple below, the winds would, without friction effects, be moving counter-clockwise around the center of the low in the northern hemisphere. However, when the surface friction is accounted for, the wind slows down, and therefore the Coriolis force weakens and the pressure gradient force becomes dominant, resulting in the spiraling of air into the center of a low pressure system and away from the center of the high pressure system. This causes convergence in the center of the low pressure system at the surface. It is this surface convergence which leads to rising air which can create clouds and even cause rain and storms to form.
At the same time, wind flows around a northern hemisphere high-pressure system in a clockwise manner, but when frictional effects are introduced the wind again slows down, and the Coriolis force reduces and the pressure gradient force becomes dominant. In this case, though, the pressure gradient is outward from the center of the high, so the result is that surface wind spirals away from the center. This causes divergence (convergence) in the center of the high (low) pressure system at the surface. This surface divergence causes sinking motion which supresses cloud development and gives us clear skies.
Below is an interactive tool for you to explore how friction affects
the wind as you change the roughness of the terrain and the elevation.