In an electronic roulette, the ball landing on a specific number is determined by a random number generator (RNG) that is programmed into the game's software. The RNG uses complex algorithms to generate random and unpredictable outcomes, ensuring that the result of each spin is truly random.