Q:

In the NBA, what is the difference when players shoot foul shots alone vs. around other players?

I've noticed in the NBA that when a player takes a foul shot, they're usually surrounded by other players lined up around the box. But sometimes when a player is shooting a foul shot, they're completely alone.
What is the difference between these two foul shooting situations?
 

A:

There are two kinds of foul shots, those that end in possession of the shooting team, and those that are up for grabs on a miss but awarded to the opposing team on a make. 
Normal foul shots on personal fouls are the second kind. Both teams are free to rebound a miss and the non-shooting team is awarded the ball on a make. 
However, for flagrant fouls and technical fouls the team that shoots the free throws is awarded the ball regardless of the result of the shot. Since the rebound cannot be contested the player is allowed to shoot by himself.

