In subsonic aerodynamics, the theory of lift is based upon the forces generated on a body and a moving gas (air) in which it is immersed. At speeds of approximately 260 knots, air can be considered incompressible in that, at a fixed altitude, its density remains nearly constant while its pressure varies. Under this assumption, air acts the same as water and is classified as a fluid. Subsonic aerodynamic theory also assumes the effects of viscosity (the property of a fluid that tends to prevent motion of one part of the fluid with respect to another) are negligible, and classifies air as an ideal fluid, conforming to the principles of ideal-fluid aerodynamics such as continuity, Bernoulli’s principle, and circulation.
In reality, air is compressible and viscous. While the effects of these properties are negligible at low speeds, compressibility effects in particular become increasingly important as speed increases. Compressibility (and to a lesser extent viscosity) is of paramount importance at speeds approaching the speed of sound. In these speed ranges, compressibility causes a change in the density of the air around an aircraft.
During flight, a wing produces lift by accelerating the airflow over the upper surface. This accelerated air can, and does, reach sonic speeds even though the aircraft itself may be flying subsonic. At some extreme AOAs, in some aircraft.