Write it on a scoresheet and it takes one line: 4.O-O. Press the clock once. Your opponent replies. Two pieces have finished on new squares and the accounting has not noticed, because the FIDE Laws define castling as a move of the king (Art. 3.8), carried out by transferring the king two squares towards the rook and then putting that rook on the square the king crossed.
One move, two pieces
This is the only place in chess where your own pieces both move on the same turn. Even promotion, which also changes two things, only moves one piece: the pawn walks to e8 and turns into a queen, and no second unit travels.
The consequences are all the boring ones you would hope for. Castling takes one turn, so your opponent replies straight after it. It goes down as a single entry on the scoresheet, written O-O or O-O-O. It counts as one move for the clock, one press. And it counts as one move towards the fifty-move rule, without resetting the counter, because it is neither a capture nor a pawn move.
It is also worth being clear about what it is not: it is not a free move. You spend a tempo on it, the same as you would on Nf3 or d2-d4, and that is why castling on move four instead of move ten is worth so much.
It behaves like any other move
Because it is one move, everything that applies to moves applies to it.
It can give check. In the position below the d-file is open and the black king sits on d8, so the king goes to c1, the rook lands on d1, and Black is in check from a move that was mostly about getting the king to safety.
7
2
a
e
h 1 It can even be checkmate, when the rook arriving on d1 or f1 is the last piece of the mating net. That almost never happens in a real game, but it turns up in composed problems, and it is legal in exactly the way any other mating move is.
And because it is a king move, the touch-move rule treats it as one. Touch your king with the intention of moving it and you are committed to a king move, which may be the castle. Touch the rook first and you have played a rook move instead, which is the subject of which piece you move first.
The one thing to take away
Count it as a move when you plan. Beginners who think of castling as a freebie put it off, play one more developing move, and then find that the e-file has opened and the chance is gone. Castling costs a tempo and buys a king a home, and that is one of the better deals in the opening. If you want to see how often the move itself is the answer to a position, try a set of castling puzzles.