How does a discharged capacitor work when a dc passes through?
Q = CV is the basic formula for a capacitor and applies always. 

Rate of change of Q (charge) is current so: -

I = C dv/dt

If you inject 1 amp into a 1 farad capacitor the voltage rises at 1 volt per second. It has to. If you pull 1 amp from the same capacitor the voltage falls at 1 volt per second.