A 2-pointer in basketball is a shot scored anywhere inside the three-point arch. This includes the paint, midrange and at the rim. All of these shots count for two points, unless taken from the free-throw line for a foul shot.
A shot taken during the game from inside the three-point arch is considered a 2-pointer, since any shot made from inside of that range results in 2 points for that team. This includes shots taken from beyond the arch if a foot of the player shooting the ball is on or over the line or lands on or over the line.
Before the 3-point shot was introduced into the NBA in 1979, a shot made from anywhere on the court resulted in 2 points. Now, players are rewarded more for shots taken from a farther distance, but the 2-pointer still sees higher attempt rates.
The shot variety available to players within the three-point arch makes the area much more dangerous to defensive players. It can be hard to determine when someone is going to pull up for a jump shot or drive to the basket for a layup, but you have to be ready either way!