There are two of them, they wear grey shirts and black pants and sometimes they blow their whistles, run over to the table officials (scorer, clock-keeper, press etc.) and do that thing with their hands. These signals are used to indicate to the players and to the table officials when there has been a foul or violation. Signals are also used to start the game, stop the clock, allow substitution etc. There are three categories of hand signals, covering: fouls (illegal contact or interference with an opposing player), violations (illegal ball-handling, exceeding time limits and so on) and game control (tip-off, time-out, reset clock etc.). The following is not a complete list but illustrates most of the common stuff.


Stop the clock after a violation or score or for any other reason (eg. commercial breaks in the US...). Stop the clock after a personal foul. The official will also extend his/her other arm in the direction that the offending player's team is playing, indicate shirt number and signal whatever personal foul he/she has called.

FOULS

blocking

holding

charging

pushing

illegal use of hand

Unsportsmanlike or flagrant foul. This can lead to instant dismissal.
Signals that a player has committed a fifth personal foul and must sit out the remainder of the game.
Technical foul - arguing with an official, abuse etc. A technical can be called against the bench, coach and even supporters as well as the on-court players. Double foul - either a held ball or simultaneous personal fouls by opposing players.
Others: Official points at his foot to indicate deliberate kicking of the ball; official extends and rotates right arm, palm uppermost, to indicate carrying of the ball during a dribble.

VIOLATIONS      
Tavelling - moving with the ball without dribbling.
illegal dribble.


3 second rule violation. 5 and 10 second violations are signalled by holding up one or both hands at chest or head height.
  Ball returned to attacking team's backcourt. Shot clock has run down with no shot attempted.

GENERAL    

team time-out

shirt number of offending player (not always #6!). nos. are limited to 4-15 plus 20-25

reset the clock

cancel score

2 points

3 points attempt

3 points made

1 free throw

2 free throws

3 free throws

top