Each time the capacitance C gets charged through the PMOS transistor, certain amount of energy is drawn from the power supply. Part of this energy is dissipated in PMOS device and remainder is stored on the load capacitor. During the high to low transition, the capacitor is discharged and the stored energy is dissipated in the NMOS transistor. Dynamic power is associated with this switching from high to low and low to high.

where
is the switching frequency of the gate and C is the output capacitance driven by the gate.
Another source of dynamic power dissipation is due to short-circuit current. Due to the finite slope of the high to low transition or low to high transition of the input signals, both the PMOS and NMOS transistors are partially on for a short duration and there exist a direct path between V DD and Ground.