In baseball statistics, a hit (denoted by H) is credited to a batter when he safely reaches base as the result of striking the ball, without the benefit of an error or a fielder's choice.
In cases where a ball takes a funny bounce, and a fielder might have a chance of throwing the runner out but does not, it is at the official scorer's discretion whether the batter is given a hit or instead reached on an error.