This is a rare form of getting the batsman out. The batsman, while the ball is still in play, is not supposed to touch the ball - more appropriate handle the ball - with his hands.
In the event of the batsman handling the ball, while still in play, the opponents may appeal for handling the ball and if it falls within the framework of the laws of play the umpire shall uphold the appeal.
There are instances where the batsman deliberately interferes with the ball so as to avoid oneself from being dismissed and there are instances where the batsman interferes or handles the ball in a fair manner.
In the first instance, for example, if the batsman plays the ball and finds the ball trickling towards the stump and happens to stop or divert the course of the ball with his hand, then he shall be declared out handled the ball on an appeal form the opposing team.
The batsman, however, can use his feet or padded legs to "kick" the ball away from the stumps after he has played the stroke.
In the second instance, for example, if the batsman plays the ball and the ball falls close to the batsman and if the happens to pick up the ball and give it to the fielder, then, even in such a case the umpire is obligated to uphold an appeal, even though the batsman interferred in a fair manner, as it falls within the framework of the laws governing the game.
However these days nobody appeals for such an incident as it is considered as an unsporting gesture.
There are very few instances in modern cricket of a batsman being given out for handling the ball.