Stalemate
When a King is not in check, is unable to make a legal move (IE: blocked pawns) and the only moveable piece is the King, but moving it places it in Check, it is a stalemate/draw.
To avoid - A stalemate cannot occur if the King is in check. If you check the King each move you are safe. Any time you must move that does not put the King in check, look very carefully at all of the squares around the King and which squares are taken away by all of your pieces, making sure the King has one square to move to before you move.