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.