Consider a purely resistive element with an AC voltage applied to it. You can see more on this website: http://www.play-hookey.com/ac_theory/ac_resistors.html
For the first half of the wave, the voltage is positive, say 10 VRMS. The current is also positive, say 1 ARMS.
The power is given by P = VI. 10V * 1A = 10 W. That's positive power, representing power taken from the source.
At the second half of the wave, the voltage goes negative, and the current reverses with it.
-10V * -1A = 10W, a positive value of power again.
With inductors and capacitors, the voltage and current have a 90 degree phase shift, to the power relationship is a little more complicated. View this page now: http://www.play-hookey.com/ac_theory/ac_capacitors.html and look at the graph with red and blue lines. Red line is voltage, blue line current.
During the first quarter of the voltage wave, both voltage and current are positive. That's positive power, representing energy being taken from the source.
During the second quarter, voltage is still positive, but the current has reversed and become negative. This is negative power, representing energy being returned to the source.
During the third quarter, the voltage becomes negative too. Both current and voltage re negative, so the power is now positive, and energy is being taken from the source.
At the final quarter, voltage remains negative, but current swings up to positive, resulting in negative power, and energy is returned back to the source. Then the cycle repeats again. The situation is similar for inductors.
In a perfectly reactive circuit, the periods of positive power and negative power exactly cancel each other, so no energy is lost. No circuit is purely reactive though, so any practical circuit will have resistance in it, resulting in less negative power and energy dissipation.