When your team is have the ball you try to make a basket. And if your team doesn’t have the ball you try to make the opposing team not do a basket.
Both team can only have 12 players max. 5 guys each team are playing on the court and 7 others are on the bench with coach and an assistant coach.
There are only 2 referees in a game but in the NBA there are 3. There is 1 main referee and 2 assistant referees