Capacitors in electronic devices and long cables have capacitive loads. Capacitive loads require power to charge their capacity. This power is referred to as capacitive reactive power. The apparent power (S1) is defined as the vector sum of actual power (P) and capacitive reactive power (Q1).
For a purely capacitive circuit (such as that in
[Fig. 1]), i leads v by
$90^\circ$, as shown in
[Fig. 2].

Fig. 1: Defining the power level for a purely
capacitive load.

Fig. 2: The power curve for a purely capacitive load.
$$ \bbox[10px,border:1px solid grey]{p = VI(1 - \cos 2wt) \cos \theta + VI \sin \theta (\sin 2wt)} \tag{1}$$
Therefore, in Eq. (1), $\theta = -90^\circ$. Substituting $\theta = -90^\circ$ into Eq. (1), yields
$$ \begin{split}
p_C &= VI(1 - \cos 2wt) \cos -90^\circ + VI \sin -90^\circ (\sin 2wt)\\
&= 0 + -VI(\sin 2wt)\\
\end{split}
$$
or
$$\bbox[10px,border:1px solid grey]{p_C = -VI \sin 2wt} \tag{2} $$
where $-VI \sin 2wt$ is a sine wave with twice the frequency of either input
quantity (v or i) and a peak value of $VI$. Again, note the absence of an average
or constant term in the equation.
Plotting the waveform for $p_C$
[Fig. 2], we obtain
$$ T_1 = \text{period of either input quantity}$$
$$ T_2 = \text{period of pC curve}$$
Note that the same situation exists here for the $p_C$ curve as existed for the
$p_L$ curve. The power delivered by the source to the capacitor is exactly
equal to that returned to the source by the capacitor over one full cycle.
The net flow of power to the pure (ideal) capacitor is zero over a full
cycle,
and no energy is lost in the transaction. The power absorbed or returned
by the capacitor at any instant of time t1 can be found by substituting t1
into Eq. (2).
The reactive power associated with the capacitor is equal to the peak
value of the $p_C$ curve, as follows:
$$Q_C = VI \,\, \text{( VAR)}$$
or, since $V = IX_C$ or $I = V/X_C$,
$$Q_C = I^2X_C \,\, \text{( VAR)}$$
or
$$Q_L = V^2/X_C \,\, \text{( VAR)}$$
The apparent power associated with an inductor is $S = VI$, and the
average power is $P = 0$, as noted in
[Fig. 2]. The power factor is
therefore
$$ F_p = \cos \theta = {P \over S} = { 0 \over VI} = 0$$
The energy stored by the capacitor during the positive portion of the
cycle (
[Fig. 2]) is equal to that returned during the negative portion
and can be determined using the equation $W = Pt$.
Proceeding in a manner similar to that used for the inductor, we can
show that
$$ W_C = ({2 VI \over \pi}) \times ({T_2 \over 2})$$
and
$$ \bbox[10px,border:1px solid grey]{W_C = {VI T_2 \over \pi}} \tag{3}$$
or, since $T_2 = 1/f_2$, where $f_2$ is the frequency of the $p_C$ curve, we have
$$ \bbox[10px,border:1px solid grey]{W_C = {VI \over \pi f_2}} \tag{4}$$
Since the frequency $f_2$ of the power curve is twice that of the input
quantity, if we substitute the frequency f1 of the input voltage or current, Equation (4) becomes
$$ W_C = {VI \over \pi 2f_1} = { VI \over w_1}$$
However, $I = V/X_C = V w_1 C$,
so that
$$ W_C = {(Vw_1L)V \over w_1}$$
$$ \bbox[10px,border:1px solid grey]{W_C = C V^2} \tag{5}$$
providing an equation for the energy stored or released by the capacitor
in one half-cycle of the applied voltage in terms of the capacitance and
rms value of the voltage squared.
Do you have any questions?