A game of chess is divided into three distinct phases, known as the Opening, the Middlegame, and the Endgame, each of whitch has its own strategies (although there are many strategies that apply equally to all three). Not every game will feature all three stages - sometimes a game ends in the opening or the middlegame without ever reaching an endgame, and sometimes a game can go straight from the opening to the endgame with scarcely a middlegame at all.
The opening in chess covers the first 10 to 15 moves of the game, in which both players are moving their pieces from their starting positions to take up active posts ready to do battle in the middlegame. Because the opening always starts from the same position, a large body of opening theory has built up over the years. Many chess openings have their own names, such as the Queen's Gambit or Sicilian Defence. You don't need to know what the openings are called to get started in chess, though. Below is an example of the opening phase:
It can be difficult to pinpoint the exact transition from opening to middlegame, but as a general rule it occurs once the pieces have been deployed from their starting squares and the kings have castled to safety. The middlegame is often considered the most exciting phase of the chessgame. It is in this stage of the game, after the opening has finished but while there are still plenty of pieces on the board, that the king is in the most danger and must be carefully defended from attack. Below is an example of a middlegame position:
If neither player achieves a knockout blow in the middlegame, the game will eventually reach the endgame. This is the stage of the game when most of the pieces have been captured and only a few remain. As with the opening, it can be difficult to pinpoint the transition between middlegame and endgame. Some players will call any position without queens an endgame, while for others the endgame is only reached when the players have only one or two pieces other than pawns left on the board. Usually, the players don't have enough pieces left to easily checkmate the opponent's king, so strategy in the endgame generally revolves around getting a pawn to the other side of the board to make a queen. Here is a typical endgame position: