In the NBA, and in BB, free throws are not shot after most fouls, except if the player who is fouled was shooting. But in a penalty situation, free throws are shot. The penalty situation occurs on the 5th foul in a quarter, or on the 2nd foul in the last two minutes of a quarter. The "bonus" light for your team comes on when the other team has committed 4 fouls in a quarter, which indicates that the next time a player on your team is fouled, he will shoot free throws.
In earlier times, and other different basketball rules (such as the NCAA), a single free throw was shot after each foul, but once a team committed too many fouls in a period, the other team would shoot one-and-one, which means that if the first free throw is made, then a 2nd "bonus" free throw was awarded. "bonus' is a holdover term from those rules.