This is one of the very common Endgames in Chess. It usally occurs when someone has gained a one pawn advantage and simplified (exchanged equall peices) down to the single pawn. The king shepherds the pawn across, see The Opposition, King vs King and single pawn, and gets to turn the pawn into a queen.

There is a slight danger of stalemate in this ending but it can be easily avoided if you follow this simple system.

In this endgame the first step is to get your opponents king to any of the four edges of the board. The key to this is to move your king and queen in unison as to slowly push the opponents king to one side. Once the opponents king is on the edge station your queen on the rank or file that is right beside the edge. Your king must be be two ranks or files away. Your opponent can only move back and forth on the one lane. As soon as the your opponents king is in line with your king move your queen between the two of them for checkmate.

 --- --- --- --- 
|   | BK|   |   |
 --- --- --- ---
|   | WQ|   |   |
 --- --- --- ---
|   | WK|   |   |
 --- --- --- ---

Endgames in Chess
Chess Openings