Flexing and extending of joints are how we move and stay in balance. Traditionally seen as just a means to control pressure, that's not the entire story - here's some of the biomechanics around flexing and extending (short leg and long leg).
Generally, we will talk about the flexion and extension of the legs, i.e. getting short through flexion vs getting long via an extension. The joints of major interest to skiing are:
These all contribute to the leg extending and flexing (i.e. getting short or long), while staying in balance:
As a movement, many frameworks consider vertical movement as an entire category 2, described as changing the position of the COM vs the BOS (base of support) in the vertical plane, as a "holistic" movement of the lower and upper body.
However, we have to remember that in skiing, the planes of references are tied to the skis, see Vertical movement in performance skiing. In this context, these movements are always in the "vertical" plane, always vertical movements, because the boots are connected vertically to the skis! Although they are in the vertical plane, they have nothing to do with "up" - that's one of the most pervasive misunderstandings about ski terminology.
Often, flexing/extending is seen as a pressure control mechanism 3, in the sense that an extension increases pressure and flexion reduces pressure. They are part of it, of course, but not the only movement that controls pressure (muscle action, for instance, is relevant, where there is an extension or not). Also, that is not their only use. In fact, as you'll see next, that's not their major function in performance skiing - where the legs flex and extend independently and where extension prepares for pressure and the relaxation removes pressure. Also, flexion of the inside leg creates angles etc
This is a somewhat more comprehensive view, and also the common view in racing coaching, because it also includes not just the up/down movement of the COM and pressure management, but also Long leg and short leg, which is an important aspect in racing and performance skiing.
So, while flexing both feet moves the COM down, flexing only the outside leg creates a release and flexing only the inside leg transfers weight to the outside ski and helps establish inclination and allows tipping into the turn. Also, in the Essentials framework, the extension of the outside leg is not "active" to impulse the body "up" but passive, to maintain contact with the snow, flexing being the preferred release mechanism instead.
The outside leg should be long at the apex, so we can stand on it. In large turns, we spend more time on a long leg than in slalom turns. It will start to relax and get short (flex) as we complete the turn and want to release the ski.
At skis flat, both legs are equally flexed. From here, the new outside leg extends into the new turn, all the way towards the apex, where it is now long.
So, in a nutshell: the outside leg extends from skis flat to the apex and then flexes from the apex to skis flat!