There are a few different types of fouls that a player can be charged with. You'll see options for Technical Fouls, Flagrant Fouls, and Personal Fouls in your scoring settings.
Personal Fouls are the most common in the NBA. They are usually given for things like pushing, charging, or anything that can impede the route of the opponent.
Once a player commits six personal fouls, they are disqualified for the remainder of the game as they have "fouled out."
Technical Fouls are a little more serious. These are not made by physical contact but are received for things such as unsportsmanlike conduct, disrespectfully addressing an official or anything that is detrimental to the game, in the official's opinion.
An official can eject a player after one technical foul, but that player is automatically ejected if they receive two in one game.
Flagrant Fouls are the most serious and generally involve physical force or intentional injury to another player.
The player is not necessarily ejected for 1 of these, but they can be depending on the referee's discretion. Numerous flagrant fouls over the course of the season can get a player suspended and fined by the league.