Against a centre or knight pawn on the seventh, the queen checks until the king is forced in front of its own pawn, then the attacking king takes one step. Repeat until the king arrives and the pawn falls.
A lone queen versus a pawn on the seventh rank supported by its king is the textbook application of the zigzag. The e-pawn will promote next move unless the queen acts, and White's king is a long way off on h8. The method works for centre pawns (d, e) and knight pawns (b, g), regardless of how far away the attacking king is.