The key to blocking is to position your legs and body in line with the shot. The puck should hit your shin pads straight on. If you're afraid of getting hit by the puck and turn to the side, the puck might hit your ankle or the side of leg where you are much more vulnerable. Unless you are willing to face the shooter head on, you're better off getting out of the way altogether.
Get as Close to the Shooter as Possible
The closer you are to the shooter, the less time the impact of the puck. Back away from the shot, and you risk screening your goalie. You also increase risk of taking the shot somewhere on your body , which can be extremly painful. Remember, you're not the goalie. If you're near your own net when the shot comes at you withy great speed, better to clear out of the way and let the goalie make the save.
Start practicing by blocking shots using a tennis ball or hockey ball until you get the right feel for it. Then move on to blocking real shots with real pucks. It is also a good idea to get a pair of ankle guards.
Once you know how to block shots standing up, try blocking on your side with a controlled slide in front of the shooter. As you have practiced before, your shin pads should be stacked on top of each other and lined up with the shot. Be careful not to slide too fast, in case the play is faked.
Remember blocking shots is not just defensive play, it can make the difference between winning and losing.