There are exactly three ways out of check: move the king, block the attack, or capture the checking piece.