Free throws are ordinarily not shot unless the player who was fouled was in the act of shooting. Otherwise, his team simply gets the ball out of bounds.
But if a team commits too many fouls, the other team is placed in a "penalty" situation, where they shoot free throws after any foul. In the NBA (and BB) this occurs on the 5th foul in a quarter. The "Bonus" light is turned on when the opposing team has committed a 4th foul in a quarter - which means that on the next foul, the team that is fouled will shoot free throws regardless whether they were shooting or not.
Technically, the penalty situation also occurs after the 2nd shot in the last two minutes of a quarter - but BB has not yet implemented that. Also, "Bonus" refers to a different set of basketball rules, where free throws were shot after every foul, but after a certain number of fouls, a team would shoot one-and-one, which means that if they make the first free throw, they are awarded a "bonus" free throw. When they reach that situations, they are said to be "in the bonus".