When you are in check you must escape. The ways to get out of check are to move the king, block the check with another piece, or capture the checking piece.