I'm a chess beginner, and I was wondering: why was this movement introduced to chess, and why is it important to the game?
It's called castling. It's important because it gets your king out of danger (the centre is not safe), while simultaneously moving your 'tower' (also called a Castle, or a Rook) into the centre, where it is much more useful.
See this related question: Is castling still done in the openings in modern chess?
This is called "castling". The Wikipedia article has information about the origins of the move.
The move is important to build a fortress for your king, and to free the rook for attacking the enemy king.
The name of the move is castling.
The history of the move is explained well on the wikipedia page.
The main advantage is that you move 2 at the same time. It's important to note that the 2 castlings are not the same. The long one is more aggressive and if you do it right, you get your rook in line with your queen.
Traditionally, taking the center should be an objective. Castling enables this.
I don't consider myself a strong player, but in my experience, Castling is best used for positioning rather as a defense for your King. Remember, you need to have the Initiative...
About the importance of the move:
- (Usually) Helps to get your king to safety. Very often, center line is not safe in a battlefield.
- Brings the rook closer to the center line. Oftentimes, the fight will be around those lines. You could read on "importance of center" if you are interested.
- Only move that lets you move two pieces helping in tempo
- Only move that lets you move your king two squares
- Allows one to connect the rooks. We say rooks are connected when they protect each other.
Of these, the first two are the most important. King safety is essential by the very nature of the game. Getting the rook out in the game is also important. For example, in many queen side castling moves, players intend to bring the rook for the attack. Many people use this move in almost all their games.
And when was it included in chess? Obviously, it was not in the early versions of the game. It is an addition to the fast European chess for sure. 14th or 15th century is an estimated time. The wikipedia entry for castling looks nice.
This related question is on the history of castling. It is a nice read.
The main purpose of castling is to "develop" the king, not the rook. The king is easier to defend towards the end squares but can be in danger anywhere.
However around the e-file the king also gets in the way of the other pieces, in particular blocking the rook in. Thus the castling move "swaps" the positions of the king and rook simultaneously.
The normal sequence of opening moves is to first get minor pieces out and a few pawns, castle, get the queen out and that leaves the two rooks alone in the back-rank aside from the king near the end where they can move around freely between the files.
In highly "attacking" chess games, the two players may castle on opposite sides, i.e. one does the king-side and the other the queen-side. You then launch an attack on the side where the other play has his king by moving the pawns forward. However you also need to defend your own side from the opponents attack.
Such games often suit white better. I therefore once had a rule that if I was black I would wait for my opponent to castle first. I'm not sure about the general validity of that rule, but something to consider.