Stalemate
If your opponent has no legal move and is not in check, the game is a draw. Learn to avoid this trap when you are winning.
No moves, no check
It is Black's turn. The king is not in check, but every square it could go to is attacked by the queen, and Black has no other pieces. When the side to move has no legal move and is not in check, it is stalemate, and the game ends in a draw.
The winner's trap
Stalemate usually happens to the player who is winning. With a queen against a bare king it is tempting to squeeze the king tighter and tighter. Here queen to f7 looks strong, but Black would have no move at all. Before every move, ask: will my opponent still have a legal move?
Give the king a square
Your turn
Don't stalemate! Bring your king closer while leaving Black a move, then checkmate.
Show the answer
King to f6 left Black one move, to g8. Then the queen landed on g7, protected by your king: checkmate.
Same idea, other corner
Your turn
Checkmate in two moves without stalemating Black.
Show the answer
King to b6 left Black only b8, and then the queen gave checkmate on the back rank.
Quick check
Question
It's Black's turn. Black is not in check but has no legal move. What happens?
Show the answer
The game is a draw
That is stalemate. Neither side wins, no matter how much material one side has.