Now consider what can happen when a pawn unmasks an attack by another piece by clearing its file or rank.
The kernel of a pawn discovery takes practice to see because it can look so unassuming. A pawn on the same rank or file as a rook or queen, or on the same diagonal as a bishop or queen: these are the patterns to absorb, and they usually look innocuous to the untrained eye. The position to the left is a good example. White’s queen is masked by his pawn on f5 and an enemy pawn on f7. True, White’s rook on d1 also is masked in a somewhat similar way, but the queen is more interesting because it's aimed at Black’s king. A sequence that would clear the pawns from the f-file might create a discovered check or mate threat.
So how do you clear pawns from a file? The answer is the same for your pawn and for your opponent’s: they have to make captures. One way to force that result is to take something a pawn protects; but another, useful here, is to simply place a piece en prise to the enemy pawn in a way that creates a threat and requires the pawn to capture. A check is the best example, and White has one that works in this case: Ng6+, forking Black’s king and queen. Black has to play f7xN. Now two things have happened: the enemy pawn has been cleared from f7, and White’s own pawn on f5 has been given a way to get off that file and make a threat: f5xg6+, which unmasks check by White’s queen and also threatens g6xR. The rook will be lost to the pawn, whether it stays put or moves to f7 to block the check.