back substitution
Picture the same staircase as forward substitution, but now the easy equation is at the BOTTOM: the last equation involves only the last unknown, the second-last involves the last two, and so on. Back substitution climbs UP that staircase: solve the bottom equation for x_n, plug it up into the next to get x_{n-1}, and keep going until you reach x_1. It is exactly the 'work backwards' step that finishes Gaussian elimination.
Formally it solves an upper-triangular system U x = y, where U has nonzero entries only on and above the diagonal. The last row reads u_nn x_n = y_n, so x_n = y_n / u_nn. The i-th row reads u_ii x_i + ... + u_in x_n = y_i, and since x_{i+1}, ..., x_n are already known, you rearrange to x_i = (y_i - sum_{j>i} u_ij x_j) / u_ii. You sweep i from n down to 1, bottom to top. Like forward substitution, the cost is about n^2 flops.
Back substitution is the second half of an LU solve: after L y = b by forward substitution you finish with U x = y here. It is also the final stage of plain Gaussian elimination, which is why people speak of 'eliminate, then back-substitute'. The reliability of the divisions by u_ii is exactly what pivoting protects: a pivot that ended up tiny makes back substitution amplify errors, so partial pivoting keeps the diagonal of U as large as it reasonably can.
Solve U x = y with U having rows (1, 2) and (0, 3), and y = (5, 6): x_2 = 6/3 = 2; x_1 = (5 - 2*2)/1 = 1.
Bottom-up: x_n first, then each earlier unknown using the ones below it.
Back substitution divides by each diagonal pivot u_ii, so a tiny pivot wrecks accuracy — this, not 'zero pivots only', is the deeper reason pivoting matters. It runs only on upper-triangular systems.