You don’t have to move your king when he is in check. However, you are obliged to get him out of check immediately. When your king is in check, your next move is always to get him out of it. You can move your king to do so, but you can also block the check with another piece, or capture the piece that is putting the king in check.
There is no way that a pawn can attack on the very first move of the game because all the pieces, except that pawn itself, are in their starting positions. However, if white were to move any of their pawns 2 spaces on their first move then black’s response could result in a pawn attacking that pawn. So a pawn may attack on their first move as long as it’s not the very first move of the game.
Checkmate is a winning position in the game of chess. It is achieved by placing an opponent’s king in check and the opponent being unable to move their king out of check (or to remove the threat of check) on the next turn. A stalemate happens when a player cannot make any move that does not put their king into check. This is a draw, so neither player wins nor loses.
For many players one of their earliest tactical objectives is to open up their position enough that they can move the king to safety through castling and it’s important to understand how this critical process in chess really works. You can only castle once during a game, and it’s the only time that the king can move more than 1 square at a time.