A defensive foul in basketball is a foul committed by a defensive player. There are three main types of fouls: personal, technical, and flagrant fouls. Any of these fouls can be committed by a player on defense, but the term "defensive foul" is usually reserved for personal fouls by a player on defense.
Personal fouls are called on defenders for checking a ball-handler with the hand, forearm, or body. These are common fouls that happen throughout every basketball game. If an offensive player is shooting when they are fouled, they will receive free throws for the foul.
If the contact is started by the offensive player, there is no defensive foul. Additionally, any "incidental" contact that does not have an effect on the play is also ignored.
A defensive player is allowed to place a hand or forearm on the back of an offensive player who is "posting up" on a lower defensive block, as well as keep one leg in between the offensive player's legs. These techniques are used to establish legal positioning and are technically not fouls.
In order to defend properly in basketball, the defensive player has to plant their feet and make sure they are standing still when the offense makes contact. If they are still moving when the offense comes into contact, they will be called for a defensive foul.
Defenders are capable of commiting all types of basketball fouls. They can commit personal, technical, and flagrant fouls. A personal foul would be hitting an offensive player as they try to shoot. A technical foul would be staying in the key too long and violating the three second rule. Finally, a flagrant foul can happen any time if they engage in violent contact with another player.