An RNG generates an unbroken stream of numbers, thousands per second, and the number in flight at the instant you bet determines the result. The cards, reels or wheel you then watch are an animation of that decision, not the mechanism producing it.
Before a game is licensed in a regulated market, an independent laboratory tests the generator against statistical suites to confirm its output cannot be predicted or steered, and verifies that the game built on top of it returns what its mathematics declares. This is why a licensed game does not need to cheat: its margin is already built into the certified payouts.
Why it matters
Every other guarantee on this site, the RTP, the house edge, the independence of each round, rests on the RNG doing what its certificate says. It is also why no pattern, ritual or timing can influence an online game.
Sources
Related