You don't pocket the 8-ball until the end of the game. When you have pocketed all your balls, you take aim at the 8-ball. The first player to pocket all his or her balls and then pocket the 8-ball is the winner.