How does radix-sort sort $b$-bit integers, and why does its loop run from bit 0 upwards?
Each integer $x = x_{b-1} \ldots x_1 x_0$ is read as a $b$-tuple of bits and radix-sorted with $N = 2$: for i ← 0 to b − 1: bucketSort(S, 2, i), one stable two-bucket pass per bit. Bit 0 is the least significant digit, the last dimension of the tuple, so going from bit 0 upwards is the usual "last dimension first". Time: $O(b \cdot n)$.
* After the pass on bit i, the numbers are sorted by their lowest i + 1 bits. *
Each pass splits the numbers into those with a 0 at position $i$ and those with a 1, keeps the order within each group, and puts the 0-group first. After the pass on bit $i$ the list is sorted by the value of bits $i, \ldots, 0$; after the last pass by all bits, which is the numeric order for non-negative integers. In the example, 9 2 13 1 14 becomes 1 2 9 13 14.
Signed integers in two's complement need one adjustment: negative numbers have the top bit set, so they would end up behind all the positive ones. Flipping the top bit of every key before sorting (and back afterwards) puts them in front, in the right order.
With $b$ passes of $O(n + 2)$ each, the cost is $O(b \cdot n)$. For a fixed width $b$, such as 32-bit int values, that is linear: 32 passes over the data, however large $n$ is. In code, bit $i$ of x is (x >> i) & 1.
Go deeper:
Radix sort: least significant digit — the LSD variant step by step, with a worked example.
Timo Bingmann: Radix Sort (LSD) — a short animation of LSD radix-sort with 2-bit digits on the numbers 1 to 100.