Capacitor and Resistor
For simplicity, we consider the case in which there is only a resistor between an ideal voltage source and a capacitor. Let us look at the mesh equation and the component equations of the circuit. The following applies

Let us first look at the empty capacitor with UC = 0 V. The voltage across the resistor then equals the voltage of the source. There is no operating point at which more voltage drops across the resistor. That is why the current is at its maximum when the capacitor is empty.
The current charges the capacitor. Current flows into the capacitor until it is charged to the source voltage. No more voltage can be present across the capacitor. Next, let us look at a fully charged capacitor:
At this operating point, no current flows. The potentials to the left and right of the resistor are equal. No voltage drops across the resistor any more, so the current through the resistor is 0. The voltage across the resistor depends on how much voltage drops across the capacitor, i.e. how far it is already charged. The higher the capacitor voltage, the smaller the current becomes.
With this insight, we switch to the water model for an intuitive explanation.
Water model
Note: this section up to the next heading is not relevant for the exam, but it helps a lot with understanding.
We consider a very large, shallow lake at a fixed height, which represents an ideal voltage source for water. This lake keeps its height and its fill level regardless of how much water is taken from it. A water store (bucket) is filled from this lake via a pipe. This corresponds to the electrical circuit diagram.

The voltage of the source corresponds to the height of the lake. It does not change. The voltage of the capacitor corresponds to the fill height of the store. The voltage across the resistor corresponds to the slope of the pipe, i.e. the difference in height between the pipe ends.
In the series connection of R and C, the source voltage is divided between the resistor and the capacitor. In the analogy, the height of the lake must therefore be divided between the fill height of the store and the slope of the pipe. That is why the lower end of the pipe floats on the water in the store. The slope of the pipe thus becomes smaller the higher the store is filled.
If the store is empty, the slope of the pipe is at its maximum. So the maximum amount of water flows into the store. If the store is full, there is no slope left for the pipe. No more water flows into the store. The fuller the store, the lower the inflow through the pipe, because its slope decreases. This is how charging a capacitor via a resistor works, illustrated intuitively.
The following figure shows numerical values for the electrical quantities and graphics for the respective fill levels of the capacitor in the water model:

In the left picture, the bucket is empty. The pipe has its maximum slope, and the maximum amount of water flows into the bucket. This corresponds to a resistor whose voltage is at its maximum when the capacitor is empty and through which the maximum current therefore flows into the capacitor.
The fuller the bucket becomes, the smaller the slope of the pipe, so less and less water flows into the bucket (middle picture). When the fill level of the bucket reaches the height of the source, the slope of the pipe is 0, so no more water flows into the bucket. This is shown in the right picture.
Time curves
The time curve of a filling process looks roughly like this:

To calculate the charging process, we need a switch. If the store were permanently connected to the source, it would simply always be charged. That is boring. Instead, the source is connected to the empty store by closing a switch (for water: a valve) at the time t = 1 s. In electrical engineering, a voltage source is connected via a switch to the series connection of resistor and capacitor.

Mathematical treatment
The mathematical treatment in this section up to the next heading is not relevant for the exam. The solution of the problem is described by a differential equation. You probably lack the mathematical basis for this. So simply try to follow the calculation more or less.
From now on, I use lower-case letters for voltage and current in the calculations. We use upper-case letters for constant values that do not change over time. When the capacitor is charged and discharged, voltage and current change over time, which is why I use lower-case letters. Only the constant source voltage and the constant initial voltage of the capacitor can still be written in upper case.
In the series connection of resistor and capacitor, the following equations apply:

In the bottom equation, the current and its integral appear in one equation. Differentiating it once gives an equation containing the current and its derivative. This type of equation is called a differential equation. I will not derive the solution; I simply state the result. Then we check the result for plausibility by substituting it into the equation. For the current, the following applies:
Because the equation is satisfied in the last line with U0 = U0, we have evidently substituted something correct for i0. Otherwise the left and right sides of the equation would not be equal after substitution. This shows that the upper equation for the current is correct. For the voltage across the empty capacitor with UC0 = 0 V, the following then applies:
The curves of voltage and current at the capacitor correspond to those at the store in the water model. To be able to model connecting the source via switch S better, I introduce an internal voltage ui. With the switch open, ui = 0 V. With the switch closed, ui = U0. The switch is closed at t = 0 s.


Let us look at the electrical quantities at the switching instant and after an infinitely long time. To do this, we substitute the values 0 s and ∞ for the time t. The following applies:
Discharging a capacitor
So far, we have only charged the capacitor. A capacitor is usually discharged into a load. This load often behaves like an ohmic resistor. That is why only the case of a capacitor discharging via a resistor is investigated here. Again, simplifying assumptions are made:
At the start of the discharge process, the capacitor is charged to a voltage UC = U0. It is initially decoupled from the load by a switch and therefore maintains its voltage.

Now we close the switch and look at the voltage and current while the capacitor discharges. I have again drawn the auxiliary quantity ui behind the switch.
With the switch open, ui = 0 V. With switch S closed, the capacitor and the resistor are connected in parallel. Then ui = uR. The equations for current and voltage during discharging are (again without derivation):
Let us again look at the simple points in time t = 0 s and t → ∞ to check the equations for plausibility. As soon as switch S is closed, the capacitor voltage is applied to the resistor. The voltage across the resistor is never greater than now. That is why the maximum current flows out of the capacitor. After an infinitely long time, the capacitor is completely discharged. Then there is no more voltage across the resistor either. So the current is then 0 A.

The meaning of tau (τ)
Note: from here on, the text is relevant for the exam again.
Tau has the unit second, so it is a time quantity. It describes how slowly or quickly a charging process takes place. The larger tau is, the more time passes until the capacitor is fully charged, i.e. the slower the process. The shape of the charging curve does not change with tau.
The following applies: τ = RC. The larger the capacitance C of the capacitor, the slower the charging process. According to Q = C ∙ U, more charges have to be separated until the capacitor reaches its target voltage. A larger resistance reduces the charging current, which is why charging takes longer.

At the time t = τ, the capacitor voltage reaches 63 % of its final value. So during charging, uC(τ) = 0.63 ∙ U0 at t = τ. The value of τ can be read off the time curve. It is the time difference between the moment the switch is flipped and the moment the capacitor voltage has reached 63 % of its final value.

Let us look at the bucket once more. Filling or emptying a bucket with a larger base area A takes longer. The area A is analogous to the capacitance C. Filling or emptying it via a narrower pipe also takes longer than via a wide pipe. A small pipe diameter is analogous to a large resistance. So it is plausible that τ also becomes larger with larger R and larger C.