The paint in basketball is a rectangular area on the court extending from the foul line to the baseline with perpendicular lane lines enclosing the shape. It is also known as the foul lane, or the key for short.
The paint gets its name from the shading done on courts to denote its shape. Attached to the paint are the blocks in which players line up at for free throws. The low blocks are a common spot for players to post-up.
The key used to be much more narrow with the circle around the free throw line combining to look like a key-hole. This circle is where jump balls take place for leagues that do not use alternating possession.
Defensive players are forbidden from standing inside the paint for more than three seconds unless actively guarding a player. This deters having a player in a zone scheme who just stands underneath the basket. This violation results in a technical foul.
Since players are more likely to make shots that are closer to the basket, a common statistic that is noted is points in the paint. Teams that can outscore their opponent inside typically have a better chance of winning the basketball game.
The paint itself is the colored area directly surrounding the basket. In the image below, the paint is dark blue and is outlined by a rectangular box with a semi circle on top. It has four hash marks extending from it for players to line up on during free throws. The paint's width varies depending on the league, but in the NBA the lane is 16 feet and in college it is 12 feet.
The paint is also a reference for players to position themselves both on offense and defense. Plays are drawn up where players need to be in certain spots on the court and the paint is an easy starting place.
There are rules put in place about how long a player can stand still in the paint for. Defensive and offensive players are only allowed to stay inside the paint for three seconds at a time. The exceptions to the rule are that players may exit and then immediately re-enter as well as defensive players can stay as long as they want if they are within an arm's length of an offensive player. The reasoning for the rule is so that players can both not score easy baskets and not stop every short shot.