Energy grids around the world are undergoing a transformation from conventional production schemes based on carbon to renewable energy sources. This comes at a price, since most renewable energy sources can not be controlled. Considering that most problems experienced by energy grids are handled by adjusting production, this is a major challenge. To cope with this, energy flexibility from demand have been proposed, where, instead of adjusting generation, the demand is adjusted according to the needs of the energy grids. To be able to utilise energy flexibility, first it has to be understood. Since most energy flexibility comes from systems with dynamic needs and possibilities to adjust their demand, static approaches have limited use. The main objective of this thesis, is to advance the understanding of dynamic energy flexibility. In particular, dynamic mathematical models for how to characterise energy flexibility are proposed. Contrary to previous works on energy flexibility, these models facilitate estimates of the energy flexibility when in use, allowing it to be understood out of steady state, where it will be found most of the time. Models are only as useful as the applications that they facilitate, and so, this thesis includes proposals for how to integrate energy flexibility using the developed models. This ranges from component level, where appropriate control strategies have to be implemented, to the daily operation of energy grids where energy flexibility has to be utilised, all the way to the planning of future investments in the energy grids.