A simple, series R-C circuit is yet another one of those basic, ideal examples incorporated into almost every calculus-based introductory physics course known to man.

The idea is that one can use the potential difference across a battery (or any other DC power source for that matter) to charge a capacitor by allowing current to flow through a single-loop circuit of resistance R. (The resistance can come either in the form of the intrinsic resistance of the wire comprising the circuit, or of some component resistor added as a part of the system.) The potential difference across the battery (Vtot) will be split between the resistor and the capacitor, so that the voltage over the resistor (VR) will equal

VR = I * R

where I is the current, and the voltage across the capacitor (VC) will equal

VC = Q / C

where Q is the charge stored on the capacitor, and C is the capacitor's capacitance. (Vtot = VR + VC).

The circuit will behave according to two distinct modes of operation: first, there is the case where one charges the capacitor from 0 to some maximum charge (Qmax = Vtot * C). In this scenario, the standard convention is that at time t=0, a switch is thrown and the circuit is completed. Because Q=0 at t=0, there is no potential difference across the capacitor (VC = 0), and the entirety of the voltage of the battery is spent over the resistor (VR = Vtot). As such, the initial current I0 can be found

I0 = Vtot / R

Charge will slowly accumulate on the plates of the capacitor, increasing VC and decreasing VR. As more and more of the potential difference is spent over the plates of the capacitor, the current in the circuit will decrease until the capacitor reaches its maximum charge, at which point the current ceases completely.

One can obtain a quantitative description of both the current in the circuit and the charge being stored on the plates of the capacitor at any point as a function of time by applying Kirchoff's Law and recalling that current is equivalent to the rate of charge transferred over a given amount of time (I = dQ/dt)

Vtot = IR + Q/C = R * dQ/dt + Q/C

Solving the differential equation, one finds that the charge

Q(t) = Qmax (1- e-t/T)

Where T is the capacitor time constant

T = RC

The current flowing through the circuit is

I(t) = I0 e-t/T

The other mode of operation for the circuit is that in which the charged capacitor is decoupled from the battery and allowed to discharge over the resistor. In this case, the capacitor will behave just like a battery, and its voltage VC will take on the role of the battery in the circuit (VR = VC). The charge on the capacitor will bleed off into the circuit

Q(t) = Q0 e-t/T

where Q0 is the initial charge. The current will begin at a maximum value I0 = VC /R, and fall off according to the relationship

I(t) = I0 e-t/T

until all of the charge is gone, and the current falls to zero.

... All in all, this is basically one of those horrible nightmares that keeps introductory physics students up with the cold sweats nights before the exam, but that looks really really really really easy when you try it again four years later.

(Really, honestly, I promise.)