In order to checkmate the opposing king the queen needs the support of its own king.
There is a certain plan you should follow when mating in simple positions. The plan is to gradually reduce the opponent's king free space. In our case you have to limit the king's movement on a line on the edge of the board. The queen will do this from distance while its king will gradually get closer. That is why the king which is about to be checkmated must stay as far as possible from the opposing king (the queen can't checkmate it on its own).
You should also know that in this situation (king and queen against king) the checkmate will occur in at most 10 moves.
There are certain stalemate positions that may appear in this kind of endgames. You should know what to do when you run into tem. For example look at the chess board below.
If Black were to move 1... Qg6, then he would provoke stalemate (the white king has nowhere to go). Wouldn't that be a shame.. if you are so close to victory and make a bad move like this...!The right move is : 1... Ke6 and now the white king is trapped in a zugzwang position : he has nowhere to go but 2. Ke8 Qg8. Checkmate!