A three second violation in basketball is a rule that says that a player cannot stay inside the paint for more than 3 consecutive seconds. There are two different types of three second violations, those called on defense and those called on offense. An offensive three second violation is called by referees when a player whose team is in control of the ball stays in the paint for longer than 3 seconds without trying to actively score. In a defensive three second violation a player cannot stay for three consecutive seconds inside the paint if not guarding an offensive player. The count starts when a players foot first enters the area, and it ends when both feet are out of it. A player's feet must completely leave the paint before they can re-enter, lifting feet into the air and jumping do not count as leaving the paint. The count resets when that player leaves the paint. These rules contribute to make basketball a more dynamic game, without clustered middles and with players moving around a lot.
The three second violation rules are the reason why players that are near the key are constantly moving around the court both on offense and defense. If a player is careless and ends up committing the violation, the referee will blow the whistle and bring his arm forward with 3 fingers showing to signal that there was a three-second violation. If the mistake is made while the player's team is on offense, the ball will be turned over to the opponent. If the violation called is a defensive one, a technical foul is awarded to the team, leading to a free throw attempt by the opponent plus the subsequent possession of the ball