I will try to be specific. I was playing a game, and the only piece my opponent could move was their king. It was taking forever for me to checkmate the king. I had a queen, two rooks, and a few pawns, but I was still having difficulty. My question is this: can an opponent move their king into check? For example, how about moving their king into the attacking line of a rook? Can I then capture the king, or does a check have to be initiated from the result of my move? Is it illegal for the opponent to move into a check?
It is illegal for a King to move into check, or by moving a piece, expose one's King to check. Check can only happen by the opponent attacking the King.
If this leaves a player with no legal moves, and that player is not in check, then the game is drawn by stalemate.