On all shots (except on the break and when the table is open),
the shooter must hit one of his group of balls first and:
- Pocket a numbered ball
- Cause the cue ball or any numbered ball to contact a rail
And of course if either one of the conditions fail on the shot, the player loses his/her turn.
From 1999 World Standardized Rules of 8-Ball