Shocks form in aerospace engineering due to the interaction between an object moving through air and the speed of sound. As an airplane moves, it disturbs the surrounding air, creating a pressure profile that propagates at the speed of sound. When the airplane reaches this speed, the air cannot move out of the way quickly enough, leading to a buildup of pressure at the leading edge. This pressure buildup results in a shock wave that propagates away at an angle determined by the object's speed relative to the speed of sound. Understanding this phenomenon is crucial for aerospace design and performance.