The tile number is a single dimension but the texture that holds the tiles can store tiles in two dimensions. That is, that the tile numbers wrap on to other other rows.
Here's a simple example:
Tile numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.
Tiles in texture:
0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11.
tu works out the column.
tv works out the row.
For tile number 9, the tu would be column 1 and tv would be row 2 (both start at zero).