As a beginner you should always be checking whether your queen is being threatened. Because if it is lost then you have no hope against a careful opponent.
If you move the queen too early your opponent will attack it and gain time fot the development of his or her pieces,
If the queen moves into a position to attack the king, i.e. it could capture it on the next move, that is called giving check. If Black cannot escape from the check, he is checkmated.
With the support of the king, the queen can deliver checkmate on its own on the edge of the board. Find the mate in one move here.
The next mate on the edge of the board works in a similar way, only this time the check comes from a long way away. Another mate on the edge of the board.
In the previous positions the white king kept its counterpart pinned to the edge of the board. This role can be filled involuntarily by the losing side's own pawns. Then the king is checkmated behind the three pawns of its castled position. That is a motif which is easily overlooked in practical play.
It does not matter if you do not know how the pawns move. Simply give a check; it is mate at the same time.