In reply to Malcolm White.

They use multiple cameras and advanced analytics to record and anaylze the players 25 times per second. For details, see the NBA Stats FAQ.