Before anything else we settle what we are looking at. Gas is shut in a box that exchanges no heat with the outside. Nothing goes in or out. The box does not change size. A system cut off like this is called an isolated system.
In an isolated system the energy E, the particle number N and the volume V do not move. Those three fixed quantities are what give the thing we are about to count its face. The particles in the figure are flying about, but those three are the same at every instant.
What does change from instant to instant is where each particle is and how fast it is going. A settlement down to that detail is called a microstate, and a statement of E, N and V alone is called a macrostate.
Here we lay down a single assumption. Microstates with the same E, N and V all happen as often as one another. This is the principle of equal a priori probability.
The cells in the figure are microstates of the same energy. Each lights for the same length of time. It is no more than a way of saying that none is favoured. With W states in all, each one carries a probability of \dfrac{1}{W}.
This is, in fact, the only assumption statistical mechanics makes. Everything after it is counting, and out of that counting come temperature, pressure and entropy. Going this far on so little is what marks the theory.
Why we are allowed to is not, in truth, fully settled. There is an argument that makes one want to assume it, and the left of the figure is that argument.
Left alone for long enough, an isolated system wanders among the microstates open to it. If it dwells in each of them for the same length of time, then averaging over time and averaging over every state with equal weight come to the same answer.
The right of the figure is the average we would like to take: many copies of the same system, all with the same E, N and V, laid out at once, and an average across them. What we actually measure is the first kind, the long average on one system, and granting that the two agree is the substance of equal a priori probability.
If a single microstate carries a probability of \dfrac{1}{W}, then the probability of any macroscopic description is just the number of microstates answering to it. Probability goes straight as the state count.
The bars in the upper part of the figure are the state counts for each macroscopic division. The strip below is the same counts laid end to end, and the length each division takes up in that one strip is its probability. The middle division takes up nearly all of it.
Counting and working out a probability have now become the same task. That is why the previous chapter went through how states are counted.
Split the isolated system in two and let only energy pass between the halves. Consider every division in which the left holds E_1 and the right holds the remaining E - E_1.
The number of microstates answering to a division is W_1(E_1) \, W_2(E - E_1). The two halves are independent, so the counts multiply. The lower curve in the figure is that product.
The product has a peak. As the previous piece showed, with many particles that peak is sharp, and nothing but its immediate neighbourhood ever happens. The division at that peak is what we have been calling equilibrium. Nothing is balancing against anything: that is simply where the cases are most numerous.