The amount of time an offense is given to shoot the ball. The shot clock is 24 seconds in the NBA and 35 seconds in NCAA men's basketball. Other amateur leagues sometimes use a 30-second shot clock.
The shot clock resets when the ball touches the rim. In the NBA, when a foul is called and there are fewer than 13 seconds on the shot clock, the shot clock resets to 14 seconds.
The implementation of the shot clock in 1954 is arguably the most important rule change in the history of the NBA. Before its inception, offensive possessions in the NBA were unbearable; the offense would pass the ball around to kill the clock without penalty, and it yielded an unwatchable product. The most extreme case of this is the infamous 19-18 game between the Fort Wayne Pistons and the Minneapolis Lakers in 1950. The shot clock limited the amount of time an offense could keep possession of the ball without shooting, speeding up the pace of the game. Hall of Fame Boston Celtics point guard Bob Cousy, who before the shot clock would habitually dribble around defenses to kill the clock, said "I think [the shot clock] saved the NBA."