This is considered a blocked ball. However... Player from which team, offense or defense?
If he’s from the offense, it’s an immediate dead ball, and the runners return to the bases last touched. If this act hindered the defense from getting an out (which doesn’t sound like the case, as it sounds like the ball was going out of play regardless), then whoever was being played on is called out.
If it was kicked by a defensive player from the bench, then it’s handled the same as an overthrow. All runners are awarded two bases from the time of the throw.
Moral of the story: don’t mess with a ball in play. The call will go against your team, regardless.