Two important concepts in endgames only involving the kings and pawns are the rule of the square and the opposition.
A passed pawn is a pawn that cannot be stopped from queening by an opponent's pawn. If both sides have one or more passed pawns, then the player with a protected passed pawn (protected by another pawn) is likely to have an advantage. If neither side has a protected passed pawn, then the player with an outside passed pawn (farthest from the other pawns) will most likely win.
The Rule of the SquareEdit
The Rule of the Square is used to determine whether or not a passed pawn can queen when it is not supported by its own king and the enemy king is chasing it. The idea is shown by the diagram on the right:
One side of the square is the line that extends from the pawn to the square on which it queens. The rule says: if the enemy king can reach the square of the pawn, then it can capture the pawn; if not, the pawn can queen without the aid of its own king. Remember that if the pawn is on its starting square, it can make a double step, so the square is the same as if the pawn has advanced one square. The rule is valid for all pawns, including rook's pawns.
So, in the diagram, if it's White's turn to move, then Black's king is outside the square and White can queen: 1.e6 Kb5 2.e7 Kc6 3.e8Q+.
If Black is to play, the pawn can't escape the king: 1...Kb5! (moving into the square) 2.e6 Kc6 3.e7 Kd7 4.e8=Q+ Kxe8.
The rule assumes that there is nothing stopping the king from taking the shortest route to chase the pawn. If there are pawns that might get in the way of the king then the rule does not apply:
The position is the same as the first one, except that now there is a black pawn on c6. This pawn gets in the way of its own king, so that even if it's Black's turn to move he still loses: 1...Kb5 (1...c5 2.e6! and Black's king cannot get into the c8-c6-e6-e8 square) 2.e6 Kb6 3.e7 Kc7 4.e8Q.
The rule of the square can form a basis for tactics. In the position on the right, Black to move played 1...Kb4, entering the square of White's f-pawn. He thought that this would be good enough for a draw, but White played 2.d6!. After 2...cxd6 3.f5 the effect of White's sacrifice is clear: he has decoyed Black's pawn to the a3-f8 diagonal, where it obstructs Black's king. Now White simply promotes the pawn and wins. Black had no other choice but to take White's d-pawn on his second move as otherwise it would have queened. Please note that 2.f5 Kc5 3.f6 Kd6 4.Kb2 Kd7 5.Kc3 Ke8 6.Kd4 Kf7 7.Ke5 wins as well.
When the two Kings stand next to each other so that there is one square between them, they are said to oppose each other (or to be in opposition). Because the rules of chess say that the King can't step to a square next to the opposite King, there is an invisible wall between the Kings that makes it impossible for them to advance forwards.
The player who is not to move in such situation is said to have the opposition. Since his opponent can't move his King forwards, he has to move it sideways or backwards, and after that the other player gets to advance his King forward, which is usually advantageous for him.
Let's consider the very simple position on the right that illustrates the opposition:
If Black is to move, White has the opposition. Black can't move his King forwards, so he might play 1...Kd6 (1...Kf6 is the same in mirror image). Now the f5-square becomes available for the white King, so White's next move is 2. Kf5. If Black now moves his King to e7, White responds by moving his King to e5, when a position similar to the starting position has arisen, with the exception that the white King has advanced one square forwards and thus forced the black King to retreat one square.
Now you might wonder what is the advantage of having the opposition. Let's add a Pawn to the previous position, and we get an example of how to queen the Pawn with the aid of the opposition (see diagram on right):
Now Black plays 1...Kd6, as in the previous example. White's first move is also the same, 2.Kf5, advancing his King forwards. The play might go on 2...Kd7 3.Kf6 Kd6. Now it seems that Black has the opposition, but we shouldn't forget that White doesn't have to move his King. Therefore the right move is 4.e4, when Black has to concede the opposition. Now White wins after 4...Kd7 5.e5 Ke8 6.Ke6 Kd8 7. Kf7 Kd7 8.e6+ Kd6 9.e7 and the Pawn queens next move.
This position might look like a simple win with White to move as well. However, in this case, the game is drawn. Black has the opposition, and he can use it to block the Pawn (if he is careful and doesn't blunder the opposition away). Play could begin with 1.Kf4 Kf6 2. e4 Ke6!. This is the only move that holds the draw. In this kind of position, when the defending King can't oppose the enemy King, he must never move backwards. Instead he always has to move sideways, and always to the file on which the opponent's Pawn stands. If Black had now played 2...Ke7?, White would have gained the opposition with 3.Ke5, and won the game as in the previous example. After 2...Ke6 White has no way to force the Pawn through as long as Black carefully keeps the opposition. The play could continue 3.e5 Ke7 4.Kf5 Kf7 5.e6 Ke8 6.Kf6 Kf8 7.e7 Ke8 8.Ke6 stalemate.
You need more than just a pawn and the opposition to win though. Take the position at right. Unlike the previous one, White's king is behind the pawn, and this is enough to ensure black a draw. Assuming black to move (so white has the opposition) the game might continue 1. ... Kd7 2. Kc5 Kc7 3. d6+ Kd7 4. Kd5 Kd8 5. Kc6 Kc8 6. d7+ Kd8 7. Kd6 stalemate.
Even if one side has a pawn advantage, his king is in front of the pawn, and he has the opposition, it may not be enough to win. A notable example is shown at right, namely the rook pawn. Unlike the previous case, there is nothing white can do to force black out of the corner - thus his pawn can never queen.
Outside Passed PawnEdit
The position at right is a good example of an outside passed pawn. It is not that the pawn is at the edge of the board - it is the fact that this pawn is far away from the other pawns, and acts as a decoy. It is often the case that in positions with an equal number of pawns that an outside passed pawn is sufficient advantage to win.
Take the position at right as an example. White advances his passed pawn, and when the black king is far away, he captures all the black pawns, and queens his remaining pawn.
1. f5 Kd6 2. f6 Ke6 3. Kxc5 Kxf6 4. Kb6 Ke6 5. Kxa6 Kd7 6. Kb7 and the pawn queens.
Protected Passed PawnEdit
White's c pawn is a protected passed pawn - enough to win in this position, even when black has an outside passed pawn. White could easily fritter away this advantage, and even lose, after 1. c6+?? Kc7 2. Kc5 f5 3. Kd5 f4 4. Ke4 Kxc6 5. Kxf4 Kd5 6. Ke3 Kc4 (the outside passed pawn prevailed). The correct strategy is for White to threaten the f pawn with his king, and then trade the c pawn for the f pawn in such a way that he gets the opposition. Black cannot counter by attacking White's other pawns, because then the c pawn will queen.
1. Ke5 Ke7 2. c6 Kd8 3. Kf6 Kc7 4. Kxf7 Kxc6 5. Ke6 Kc7 6. Kd5 Kb6 7. Kd6 Kb7 8. Kc5 Ka6 9. Kc6 wins both pawns
An attempt at counterplay similarly fails 1... Kc6 2. Kf6 Kd5 3. Kxf7 Kc4 4. c6 Kb3 5. c7 Kxa3 6. c8/Q Kxb4 7. Qe6 and white has no trouble stopping the black pawns and mating.
(Note: In principle, the above strategy is right. However, in this position, White has a win even after 1.c6. After 1...Kc7 2. Kc5 f5, White can play 3.Kxb5 and still has time to stop Black's f-pawn, winning the game easily.)
If the protected passed pawn is not so far advanced, it confers less of an advantage. The position at right, which has most of the pieces moved back two rows, actually provides Black with a slight advantage, but not enough to win against best defense. Black uses his outside passed pawn as a decoy, and then queens his b pawn, while white queens his c pawn.
1. Ke3 Kc4 2. Ke2 (trying to stop black from penetrating) f4 3. Kd2 f3 4. Ke3 f2 5. Kxf2 Kd3 6. Kf3 Kc2 7. c4 Kxb2 8. c5 Kxa3 9. c6 b2 10. c7 b1/Q 11. c8/Q
Black is a pawn up in an ending with queens on the board. Black has an opportunity to play for a win, but such endings are generally drawn.