Basket interference in basketball is a violation in basketball that states no player can touch the ball when it is on the hoop, ring, or in the net. A basket interference can be committed by both the offensive team and defensive team.
An offensive basket interference or offensive "goaltending" is when an offensive player makes contact with the basketball while it is inside of the cylinder. The cylinder is a term for the imaginary ring that extends upwards from the basketball rim.
Defensive basket interference is the more common of the two and is known simply as goaltending. The restrictions for what the defender can do are technically the same, however the rules were put into place for defensive situations where shots are attempted to be blocked. For that reason, defensive basket interference is stricter than offensive interference. Just like the offense there is no touching the ball while it is on or above the cylinder of the rim. After that, the differences are more noticeable.
A defender may not block any shot that has already made contact with the backboard. They may also not block a shot that is on its way down. The shot can be blocked as long as the trajectory of the ball is still moving upwards.
On top of that, there are rules that prohibit a defender from altering the shot by grabbing onto or contacting the rim or net.
A defensive basket interference automatically results in the shot attempted by the offensive team counting. Whatever the shot would have been worth had it gone in is added to the offensive team's score.