When to slow play a hand is if you are able to see that your opponent has been playing aggressively firing numerous shells at a pot. Playing against this type of opponent is the ideal situation to check call out of position and but in small raises if they lead out or flat call behind them. The ideal way to slow play a hand out of position against an aggressive opponent is to check call with a made hand and then check min or stuff the turn. This will get your made hand some value and putting in small raises may get you their whole stack. Also maybe you flopped a set versus top pair and a very aggressive opponent it might be best to check call then lead the turn with a small bet that an aggressive player will surely come over the top of. Only in that situation would it be a good idea.
If playing a tighter player when flopping a set it is almost always best to lead the flop or put a big check raise in on the flop. If lead in to on the flop playing it in position I would come back over the top and get your opponent stuck in the pot. This would be called fast playing a hand. In order to fast play a hand you have to be able to put your opponent on a hand that can call your hand or raise it ideally.
If you flop a straight on a 910J board and you have KQ it is the perfect situation to fast play a hand and bet the flop. Your opponent will call or raise this type of flop with KK or AA and numerous other hands in that range. Mainly the idea of leading with KQ in that spot is to get your whole stack in by the turn and if they have AA it might even go in on the flop and not many players have the discipline to lay down a hand like aces because they sit and wait for it forever; tight players do. Fast playing a hand like the nuts on the flop against an aggressive player is almost too easy to do because most of the time they will raise and you can flat call getting them entirely stuck in the hand and committing chips to a pot they have no chance of winning.