The king is both the most important and weakest piece in chess. Though it is often best to keep the king out of harm's way, it is within the rules to take opposing pieces with the king.Know More
Often, the only legal move available during check is simply to take the opposing piece with the king. However, if an offensive move from the king would put it in check, the move is considered illegal and cannot be made. Normally, the king does not threaten or take pieces until the endgame, when it is one of the last pieces on the board.