By scoring points. Eating dots, ghosts and fruit all build your total, and Pac-Man grants an extra life at fixed score milestones — 10,000 points is the classic threshold. The longer you survive, the more spare lives you bank.