Under old basketball rules, a defensive foul that occured when the offensive player was not shooting would result in the player who was fouled shooting a free throw. But after a team had committed a certain number of fouls in a quarter, he would shoot what is called "one and one" or "one and a bonus" which means that if he makes the first free throw, he gets to shoot a second free throw or bonus free throw. If he misses the first free throw, it is a live ball and whoever gets the rebound gets possession. The team that was being awarded the bonus free throws would be referred to as being in the "bonus". The fouls would counted on the scoreboard, and when the bonus situation occured, a light will come on.
Under current NBA rules, a defensive foul simply results in the offensive team getting possession, and a personal foul for the person who made the foul. But after the team has made its 5th foul it is said to be in the penalty. At that point, the team that is fouled starts shooting one and one. So "bonus" really indicates "penalty". The penalty can also occur after the 2nd foul in the last two minutes of each quarter. So if your team commits 2 fouls in the first 10 minutes, but then commits 2 more in the last 2, you will be in the penalty situation.
So there are two sanctions against excessive fouling. If an individual player gets 6 personal fouls in a game he is disqualified from further play in that game, or he is said to have "fouled out." And there are also the free throws awarded for too many fouls by a team in a quarter.