1.e4 e5 2.Ke2. The move has a name, the Bongcloud, and the joke is entirely about this rule: two moves into the game White has thrown away both castles for good, and there is no way back.
8
7
2
a
b
c
d
e
f
g
h 1 Putting it back changes nothing
Say White thinks better of it and plays 3.Ke1 next turn. Here is the position after 2…Nf6 3.Ke1, and it looks like an ordinary opening: both rooks in their corners, the king on e1, nothing out of place but the pawn on e4.
8
7
2
a
b
c
d
e
f
g
h 1 The only difference between this and a normal position is invisible on the board, which is why the castling field exists in a FEN. It reads kq here: Black keeps both rights, White has none. The rule asks whether the king has moved during the game, not where it is standing, and that question has a permanent answer.
Same for the rook, with one difference: a rook only kills the castle on its own side, so moving one rook leaves the other castle alive. The king kills both at once.
How kings actually get dragged off e1
Nobody plays 2.Ke2 on purpose in a serious game. The real cause is a sacrifice on f7 or f2, the softest square in the opening because only the king defends it. A bishop or a knight lands there with check, the king has to take it or step aside, and whatever happens next, the castle is gone. Those positions are a whole family of tactics, and the f2 and f7 puzzles are the fastest way to learn both how to play them and how to avoid being on the wrong end.
The other cause is a check you meet with the king: a rook or a queen on the open e-file, or a bishop dropping into b4 against White, b5 against Black. If you can block it or take the checker, do; a king move here costs more than the tempo, it costs the plan.
Playing on without it
Losing the right is not losing the game. It is losing about a move and a half of development, plus the shelter. What you do next matters more than the loss itself.
Get the king off the open file by hand. Kf1-g1 takes two moves but it reaches the same corner, and if you can follow with h2-h3 and Kh2 the king is genuinely safe. Trade queens if you can; an exposed king is a problem for the middlegame and an asset for the endgame, where a king on e2 is closer to the centre than one on g1. And do not panic into a pawn move like g2-g3 that opens a second front around a king with nowhere to hide.
Above all, stop touching it. Every extra king move is another tempo, and the one habit that prevents all of this is castling early, before your opponent has anything pointed at f2 or f7.