the canonical ensemble
Now let the system exchange energy, though not particles, with a huge heat bath held at temperature T. The box has diathermal, heat-conducting walls instead of insulating ones. Energy is no longer fixed but fluctuates; what is held constant is the temperature. This is the workhorse of statistical mechanics, because a real laboratory sample sits at a controlled temperature, not at a fixed energy.
The constants are N, V and T. The probability that the system is found in a particular microstate i of energy E_i is p_i = e^(-E_i / k_B T) / Z, the Boltzmann distribution, where Z = sum_i e^(-E_i / k_B T) is the partition function. The exponential weight e^(-E_i / k_B T) is the Boltzmann factor. The bridge to thermodynamics is the Helmholtz free energy F = -k_B T ln Z, from which S = -(dF/dT)_V, P = -(dF/dV)_T, and everything else follow.
The distribution is derived by treating system-plus-reservoir microcanonically and expanding the reservoir's entropy; the combination beta = 1/(k_B T) emerges as the reservoir's dS/dE. Energy is no longer fixed, but its relative fluctuation scales like 1/sqrt(N), so for macroscopic N the canonical and microcanonical descriptions agree. Honestly, T is a property of the reservoir imposed on the system, not an internally fixed energy.
A protein in a test tube at 300 K samples its conformations with probabilities weighted by e^(-E / k_B T); folded and unfolded states compete through their Boltzmann factors.
At fixed temperature the sample explores many energies, favouring low ones exponentially.
In the canonical ensemble energy is not fixed but fluctuates about its mean; the fluctuations are tied to the heat capacity by <(Delta E)^2> = k_B T^2 C_V.