The Stayman convention is used to find a 4-4 major fit after a 1NT or 2NT opening.
With two balanced hands and 25+ points, 3NT is often the best contract - but not always! If your side has an 8 card heart fit or an 8 card spade fit then 4♥ or 4♠ might be better. However, after a 1NT opening, there is no way that responder can bid naturally to show a four card suit because if responder bids a suit at the 2 or 3 level that shows a 5 card suit.
Instead of using a 2♣ response to 1NT to show clubs, you can change the meaning of 2♣ to Stayman, asking if partner has a 4 card major.
In the hand below, North and South are playing Acol so the 1NT opening shows 12-points. South has enough points to bid game but 3NT will go down because the opposition can take four heart tricks and a diamond. However, 4♠ will make with careful play.
You can try playing that hand now in either 3NT or 4♠
Here's an example for Standard players using a 15-17 1NT opening. Try the hand in 3NT and also in 4♠
South bids 2♣ to see if North has a 4 card major. North says yes! - I do. Now South can bid 4♠.
This time the opener has denied a 4 card major. Responder simply bids 3NT now, knowing there is no major fit.
Opener shows a 4 card heart suit but that's not the major suit that responder was looking for. Responder bids 3NT.
In these next two examples, North and South are playing a 15-17 1NT opening.
Opener shows a 4 card heart suit but that wasn't the suit partner was looking for. 2NT is still inviting to game, though, and shows the same number of points as a direct 1NT - 2NT bid would have shown. North is happy to accept the invitation.
This time North and South find a spade fit. Responder's 3♠ invites opener to bid game with a maximum hand.
South will pass no matter what the opener bids.
If the opening 1NT bid is doubled do you still play Stayman? It's up to you and your partner to decide. Some partnerships prefer to keep 2♣ as a natural bid after the double. It's up to you, just make sure you have an agreement with your partner.
The Sky Bridge Club computer plays system off. If the opening 1NT bid is doubled then 2♣ reverts to it's natural meaning.