A rook on d4 attacks fourteen squares. Put it on a1 instead and it attacks fourteen. Put it on h8 and it is still fourteen: seven along the rank, seven along the file, every time. The rook is the only piece on the board whose range does not depend on where it stands, and that is the single most useful thing to know about it.
h 1 Straight lines, any distance, forwards, backwards or sideways. It captures by landing on the square. And it cannot jump: a rook on a1 with its own pawn on a2 has nothing on the a-file at all, which is why the rooks in the starting position are the last pieces to do anything. People ask whether a rook can move diagonally constantly, usually after mixing it up with the bishop. It cannot, not even one square.
The rook’s other move
Castling is the one time a rook moves in the same turn as another piece. On 1.O-O the king goes e1 to g1 and the rook goes h1 to f1; on 1.O-O-O the king goes e1 to c1 and the rook a1 to d1. It counts as a single move, and the rook is the piece that ends up doing something useful, landing on a central file instead of rotting in the corner. The conditions are all on what castling is, and one of them catches people: once that rook has moved, even if it moves back, you can never castle with it again.
Fourteen squares are only worth something on an open file
Here is the same rook doing real work. The d-file has no pawns on it, so the rook that has been sitting on d1 doing nothing gets to d7 in one move and hits b7 and f7 at the same time.
7
2
d
g A file with no pawns of your own on it is called an open file, and getting a rook onto one is most of what rook play is. Second rank, seventh rank: same idea. A rook on the seventh eats pawns sideways and pins the king to the back rank.
Which brings up the other thing rooks do. They mate on the back rank, because a castled king with three pawns still in front of him has nowhere to go. Play through a dozen back-rank mates and you will start giving your own king an escape square without being told.