A set play is a structured offense that the coach and/or players call during the course of the game. Once the play is called, the players move in a specific sequence of actions with the goal of creating a good scoring chance or easy bucket. A set play is most often used directly after a stoppage of play such as if the ball goes out of bounds although they can be used during the course of game action too if an easy bucket is really needed at that time.
There are many scenarios in which the offense would use a set play. Sometimes a coach would like to create some movement because the offense is stagnant or he/she would like to get a good shooting opportunity for a player being left out of the offense. Creating a scoring chance from underneath the basket or after the tip-off is also an ideal time to run a play. The offense no matter the time or situation must remain patient within the offensive set and allow the options to come to them. Forcing the ball into an option is not going to make the offense successful so waiting for the best opportunity is very important.
There are few offenses that are disciplined enough to run a set play all the way through all of its options so if the defense can also stay patient and in front of all the offensive players, they can force the set play to not work. The defense can also learn from the offense's set plays and if they are used over and over they can more easily jump passing lanes and create turnovers since they have seen the offense before.