Hi,
A cap in a DC circuit (I assume you mean connected over the power lines) will initially charge to the voltage of the power rails and will then act as buffers when a load pulls more current than the supply can deliver (due to a too high impedance). The voltage on the cap will go down somewhat in that scenario, but will be replenished by the supply as soon as the load is lessened.
It will also filter out some of the noise on the power line.
When power is disconnected, it is discharged quite fast (depending on capacity and current drain).
It will self-discharge due to stray currents, both internal and through the outside - could all such currents be nulled out, it wouldn't self-discharge at all.