pawn moving diagonally


Yes, it was en passant. It took the pawn on g5.

Yes, it is en passant. The official definition of en passant is: "En passant (French: [ɑ̃ paˈsɑ̃], lit. in passing) is a move in chess. It is a special pawn capture that can only occur immediately after a pawn makes a move of two squares from its starting square, and when it could have been captured by an enemy pawn had it advanced only one square." The king being on h6 doesn't matter. When the g pawn moved two spaces, the h pawn was able to take it.

Post 2 and 3 are correct, it was en passant on white's second move.
https://www.chess.com/forum/view/daily-puzzles/7-16-2019-everyone-joining-the-party

1. d4 g5 2. hxg6+ (e.p.) Kxg6
As in, not the second move from the starting position of chess, but from the starting position of the puzzle.
The king probably got there as a result of the first four moves from the starting position of chess 1. e4 e5 2. Nf3 f6 3. Nxe5 fxe5 4. Qh5+ and so on.. The king gets chased.
I can also easily construct weird moves from both White and Black to reach that starting puzzle position.