The second source of equations we will use to solve equations is the Kirchhoff loop rule, which says
The total change in potential around a closed loop in a circuit is zero.
If we think about potential as height, then this isn't terribly surprising: if you add up all the changes in elevation, positive or negative, as you walk along a loop, of course you will end up at the same elevation you did when you started, and the changes in elevation must add up to zero.
In the circuits we will consider, there are two circuit elements where the electric potential changes.
Batteries create a potential difference equal to their emf ${\cal E}$, so the positive end of the battery is ${\cal E}$ volts higher than the negative end.
As current flows through a resistor, its electric potential drops according to Ohm's Law , so the "downstream" end of the resistor is $IR$ volts lower than the "upstream" end.
We can use these two facts to construct an equation, using what I call the tally method:
Place your finger anywhere on the circuit you wish, and start moving in any direction.
Everytime you cross a circuit element (battery or resistor), add another term to your equation:
If you cross a battery from negative to positive ("up the battery"), add $+\cal E$ to your total.
If you cross a battery from positive to negative ("down the battery"), add $-\cal E$ to your total.
If you cross a resistor $R$ and your finger is moving in the same direction as the current $I$ ("downstream"), add $-IR$ to your total (using the correct $I$ and $R$ of course).
If you cross a resistor $R$ and your finger is moving in the opposite direction as the current $I$ ("upstream"), add $+IR$ to your total (using the correct $I$ and $R$ of course).
Keep tracing the circuit until you return to your starting point. Once you do, set your total equal to zero, and you have your equation.
The animation shows you the steps to derive three loop rule equations from this circuit:
The loop rules derived are $$\color{red}{8-4I_C-5I_D-7I_A=0}$$ $$\color{blue}{8-9-7I_A=0}$$ $$\color{purple}{+5I_D-6I_E=0}$$