Suppose I have a voltage across an element $V(t) = A \cos(\omega t)$
and the current through it given by $I(t) = B \cos(\omega t + \phi)$.
The instantaneous power is
$$P(t) = V(t)I(t) = AB \cos(\omega t)\cos(\omega t + \phi).$$
A simple trigonometric identity reduces this to
$$P(t) = \frac{AB}{2}(\cos(\phi) + \cos(2\omega t + \phi)).$$
The first term is just the average power dissipated in the element and the second term is the power that goes back and forth in the element,
which as per my understanding, is the reactive power.
Now in the phasor form the power is defined as $$\frac{1}{2}\tilde{V}\tilde{I}^* = \frac{AB}{2} e^{-j\phi} = \frac{AB}{2}(\cos(\phi) - j \sin(\phi)).$$ Clearly the real part here gives the average power dissipated. But I do not understand why the imaginary part equals the reactive power.