Can a white King move next to a black King to check it, if there is a white pawn protecting the white King, preventing the black King from taking the white King?
Hi David and welcome to chess.stackexchange.com. This is a common question.
It's illegal to move a king into check, or to leave it in check. This includes moving a king adjacent to the opposing king. If you have no legal moves then the game is over: if your king is in check then you are checkmated and you have lost, otherwise you are stalemated and the game is drawn. This is basic to chess, and doesn't require any particular Laws.
If you want chapter and verse, you can find it in the FIDE Laws (which operate in all parts of the world apart from USA) Articles 1.4.1 & 3.9.2. While reading Article 1.4.1, you might also notice that it's illegal to capture the opponent's king. You might reflect that this is a curious rule in two respects (a) it can never apply in a legal position - because it would have been illegal for the opponent to have left his king in check! (b) it would never be a good move to capture the opponent's king - because then you could never checkmate it! You would be right in this reflection, but the rule is there to stop things get too crazy if an illegal move isn't spotted immediately.
To summarize: you can never move so that your king is in check, even if the king is "protected".
This is an illegal move. Even if the White King is protected, you can never put your King en prise.
However, if you were to play such a move and your opponent didn't call it ON THAT MOVE, an interesting scenario arises. Under the FIDE handbook, section 7.5.1, it says that if an illegal move happens during a game, the position before it will be reinstated. So, assume White moves his King to c6 (illegal) and Black didn't call it and moved his King to b6 (also illegal in this instance). If White THEN called Black for his illegal move to b6, the game would be reinstated to the position before White moved his King to c6 (the first illegal move that happened in the game).
Link to the FIDE Handbook:
Your movement is not valid because you are giving up your white King. It does not matter if you counter-attack with the pawn after losing your king. The match is won by the player who first takes the King.
There are questions related to yours, for example Can a piece pinned to my king put the opponent's king in check?