Opposite a 1NT opening, transfer responses of 2♦ (for hearts) and 2♥ (for spades) are indispensable.
You can also use 2♠ as a transfer for clubs and 2NT as a transfer for diamonds. As you can see, there is space for two different responses.
The first step, as in 1NT - 2♠ - 2NT, is used to show a good fit for partner's minor, usually three cards to an honor. This may allow the responder to bid a low point-count game. Otherwise, opener honors the transfer, bidding three of the indicated suit.