Capacitors
At its simplest, a capacitor contains two parallel plates made of a conducting material and separated by an insulating material called a dielectric. When the capacitor is connected to an external voltage source like a battery, positive charge accumulates on one plate while negative charge accumulates on the other. This buildup continues until the voltage across the capacitor equals the voltage of the battery. The amount of charge your capacitor can hold is measured in terms of its capacitance, the charge on the plate divided by the voltage across the capacitor.
Inductors
The simplest inductor is just a coil of wire that can carry a current. The current creates a magnetic field. In turn, the change in the amount of magnetic field passing through the coil creates an electromotive force or EMF running counter to the change in current. This might sound complicated, but it becomes simpler if you think about it in terms of two different situations. When current first flows into the coil, the change in the magnetic field it creates opposes the increase in current, so it acts like a brake. When the current stops, the change in the magnetic field now pushes current through the inductor, so it keeps the current flowing for a brief space of time after you turn off the switch.
Energy
Both capacitors and inductors store energy. Once you've stored charge on a capacitor, you can discharge it and direct the current through another circuit component like a light bulb -- fairly straightforward. An inductor is a little trickier to think about. When you first close the switch, the inductor slows down the increase in current. Gradually, however, the EMF it creates decreases, and eventually the inductor does not provide any more opposition to the current flow than a straight piece of wire of the same length. Once you shut the switch off, however, current will continue to flow in the wire for a brief space of time afterward, although this current will gradually decrease to zero.
Alternating Current
A capacitor blocks DC or direct current but allows alternating current to flow. That's because the polarity in an AC circuit is periodically reversed, so what was formerly the positive terminal becomes the negative terminal and vice versa. In an AC circuit containing an inductor, by contrast, the voltage and the current are out of phase with each other. If you drew the voltage and the current on a graph as a function of time, you would see that the sine wave representing the voltage leads the sine wave representing the current, because the inductor acts like a brake opposing any change.