We are here to learn how the Rook moves: it is a cousin of the Bishop and it shares some common characteristics with the way the Queen moves. To sum up how the Rook is moving, it moves as far as it wants on the chessboard, but only vertically and horizontally.
You are maybe coming from this article explaining how the King moves. If you do not know how it moves, I suggest you to check it as well.
This is all you have to now about the Rook. Capturing an enemy piece with the Rook works the same way than the other pieces, as well as the interaction with friendly pieces. The Rook is also involved into a special move called castling.
In case you are learning Chess, your next step should be to learn how the Bishop moves.