Block/Charge:
A block/charge foul occurs when a defender tries to get in front of his man to stop him from going in that direction. If he does not get into a legal defensive position and contact occurs, it is a blocking foul. If he gets to a legal position and the offensive player runs into him it is an offensive foul. In both situations, if the contact is marginal, no foul may be called. To get into a legal position defending against the dribble, the defender needs to get his torso directly in the path and beat him to the spot. On a drive to the basket, the defender must get to his position before the shooter starts his upward shooting motion. For off ball players, the defender must get into position and allow enough opportunity for the offensive player to stop and/or change direction. All ties are considered blocks as the defender did not beat him to the spot but arrived at the same time.
http://www.nba.com/nba101/misunderstood_0708.html