Modern chess comes from a long lineage of similar games and has a few cousins in its extended family tree. While most of Europe was playing Tafl (table) games such as Hnefatafl and Nine Mans Morris which all stemmed from Scandinavia, the East was inventing what would eventually become chess. I drew a diagram to illustrate the influences:
Most historians credit Chaturanga as the origin (although a minority give the claim to China). Many aspects of the game you'll recognise, but I'll go through the differences. Firstly the board had these markings and initial setup:
So immediately you may notice the presence of elephants instead of bishops. There is some debate as to how these pieces moved, with 3 theories. The leading one seems to be that they jumped 2 spaces diagonally. The Kings don't face each other so we get rotational rather than reflective symmetry.
However there are more differences which you can't spot just looking at the board. Missing were: double moves for pawns, castling, promotion and stalemate (which resulted in a win for the stuck rather than a draw). The Queen (or more accurately as a translation, Councillor) was a rather weak piece which moved 1 space diagonally. You also won by "baring the King", I.E. by taking all of the other player's other pieces, as long as you weren't bared on the next turn.
Here a geographical split comes up. This article focuses on the Western Branch and my separate article on the Eastern Branch is here.
So around a century later the game had traveled West with the Spice Trade. Persia had adapted some of the rules and translated the name which had become Shatranj. The phrase "Shah" (Check) meant King and was shouted when the other player's King was in trouble. Similarly "Shah Mat!" became Check Mate and meant the King is in trouble.
Kings starting facing each other (although displeasingly, the opposite way to modern chess) and now the bishop definitely jumps two spaces diagonally now. More importantly we now have promotion, but only to Queens (which were still in the rubbish Chaturanga style).
From this era we have the earliest records of strategy and even collections of puzzles. Games were much slower (in terms of turns to finish) because of the pawns only moving 1 space and the lack of good attackers.
As time marched on these games made their way to Greece and later had a second entrance to Europe through Iberia via the Moors. However they were far less played than the Tafl games which had since spread from Scandinavia into Germanic and Celtic tribes on the mainland.
Cosmetically the board adopted the black and white checkered pattern in the 10th century (which the Eastern games never picked up) although the modern Bishop and Queen rules that would justify them (diagonal moves are easier to track on checkerboard) would only pop up and become mainstream in 1475-1525.
In the late 13th century pawns acquired their extra move to speed up the game, but it created situations where pawns in neighbouring ranks could promote without ever directly threatening each other. A compromise was made around a hundred years later where en passant was brought in to fix the problem.
Stalemate came in 1422 with a manuscript from Krakow, Poland proclaiming the new rule officially. Then later we had the aforementioned final change of Bishops and Queens becoming their modern selves. This time also introduced Castling.
Elder versions of the game were still played and argued over, but most had died out by the late 15th century and this was cemented by huge body of treatises by authors such as Ruy Lopez (after which the most common chess opening is named) writing only about the modern version.
The only exception with a sizable following is Indian Chess which still bares a lot of resemblance to Chaturanga and Shatranj. It is a simpler version and gets rid of a lot of the clutter of modern chess such as castling and under promotion. It sees a lot of play in rural India.
And now we have a game which has remained constant in rules (but not in play) for half a millennium. In The Evolution of Eastern Chess you will see what this game could have evolved into. In many ways ours is relatively close to that original game of Chaturanga compared to its exotic cousins with their rivers, cannon and palaces.