Its called leg before wicket. If it hits the pad before hitting the bat, and if it would have gone on to hit the stumps it is out. There are a few caveats so it is worth looking up. With the 4 in 4, it is a very rare occurrence to take four wickets in four consecutive balls. It's probably only happened a few times in the history of cricket!