The capcitor

What does it do?

i understand that it stores energy and discharges it when filled completely, but why would you use it? what does it do for you in a circuit? what simple uses does it have?

Capacitors also take time to fill up and discharge. This can act like a cushion in your circuit.

A circuit without a cap is like slamming on the gas pedal of a drag racer. 0 - 100mph in a few seconds.

Add a Cap and resistor and it's like slowly stepping on the gas of a Cadilac. You'll get to 100mph eventually, it'll just take 15 or 20 seconds.

And just the opposite. No cap = slamming into a brick wall. With a cap = slowing from 100 to 0 over 30 seconds.

I'm sure others will have better examples and similes.

The deep answer is that capacitors have state.

More practically capacitors allow filtering, store values as charge or voltage, decouple, couple, store energy, integrate a current... There's so much they are used for its amazing!

Have a look in the learning section for circuits with capacitors - the commonest use is decoupling in a microcontroller, but in analog circuits everything uses capacitors.

A capacitor is a frequency dependent resistor for AC.

Therefore it can be used to short out high frequencies and let low ones through if you put it across a signal, or the other way round if you put it in line with the signal.

the commonest use is decoupling

True if you want to read about that then see:- http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Capacitors do calculus!

Seriously. This same question was asked about a month ago:

http://arduino.cc/forum/index.php/topic,52838.0.html

wow, thanks you guys... i guess i have to study up alot more than i thought! =)

Just another point:-

i understand that it stores energy and discharges it when filled completely,

No that's not how it works. It will only discharge when is is placed across a load or sees a voltage lower that it has charged to. If it worked like you thought it would be an oscillator all by itself.