A flagrant foul in basketball is a foul assessed to any player who performs unnecessary or excessive contact to another player. The result is a player foul and a team foul and the opposing team is awarded the ball and two free throws.
Flagrant fouls are useless to a team when attempting to intentionally foul since they give the other team free points, which is why players have to be careful keeping contact on intentional fouls to a minimum.
There are only two types of flagrant fouls in the NBA. A flagrant 1 is any foul that is deemed unnecessary, while a flagrant 2 includes the excessive classification. If a player is given a flagrant 2 foul then they are automatically ejected from the game, whereas a flagrant 1 only calls for an ejection once a player has been called for two of them.
Both flagrant 1 and 2 fouls will usually result in a monetary fine, and can sometimes lead to a suspension.
The difference between a flagrant and technical foul is that technicals are usually not related to the basketball play, rather altercations between players, coaches and referees afterwards. Flagrants on the other and are always in regard to the amount of contact and the force applied by the offending player.