One of the most important factors of the endgame is the opposition. When Kings have to be moved and one player can by force bring his King into a position similar to the one shown in the following diagram, so that his adversary is forced to move and make way for him, the player obtaining that advantage is said to have the opposition.
Thing to notice in the diagram/position is that the Kings are directly in front of each other and the number of squares between them is odd, in this case only one square.
The opposition can take many forms in this example as you can see in the diagram belo it can be called actual or close frontal opposition.
For practical matters they are all the same. The Kings always on squares of the same color, and there is one square between the Kings and the player who has moved last has the opposition.
Thing to take into consideration is that the matter of the opposition is of utmost importance and at times can take very complicated forms but all of such situations can be solved with mathematical calculations. But before you jump into all such calculations it is good to practice the basic opposition and get the grasp of it.
To conclude, the opposition in simple words, when the Kings are on the same line and the number of intervening squares between them are even, the player who has the move has the opposition.
A good example of such oppositions would be the given diagrams.
In the above position, at first glance it may look like a drawish game but in fact it is not, this is where opposition comes into play. The player that moves first wins the game. Things to note here, the position is similar on both sides of the board, same number of pieces and the squares between two kings are of even number. In this case there are 6 squares between the kings.
In that given position the moves are as follows, in this example we take into consideration that it is white to move.
Another good position to show opposition in action.
In the diagram above it looks like White is a pawn behind and the loss is not far. But yet white can draw the game, the position is an excellent example of the value of the opposition in means of defending the game for a draw.
Here is how white can follow with sequence of moves to get a draw.
White still has the opposition and any pawn moves by black will result in a draw or else black has to go over all the moves again.
Make sure you have practiced these positions good number of times before you apply them. These guides are only for reference the best way to practice is to setup the position and do it again and again until you know the thing inside out.