Unlike in offline casinos, online gambling websites can’t use gravity or physics to move a ball on a roulette wheel. So while there might be graphics right in front of you to demonstrate the real thing, physics doesn’t really apply.
So to produce the numbers for the game, online roulette wheels use random number generators (RNG). These are algorithms baked into the game’s code and what they do is they select a random number to decide where the ball will fall on the wheel. RNG’s are meticulously tested by third-party certification entities, so you can feel secure that they really are random.