In a Vegas-style slot machine the Random Number Generator is a critical part of the process of how a slot machine works. The RNG, as it’s named for short, is what determines what will be the outcome of a given spin at the time the spin button is hit.
Inside the slot machine numbers are being generated constantly, each active for mere fractions of a second, so that the game is cycling through potential outcomes at a rapid pace. When a player hits spin, that’s when the RNG is hit for the outcome.
Although the name RNG implies an actual randomness, it’s actually a pseudo-random generation because it’s man made and coded to operate in a way that approximates the ability to draw a number randomly.
This is why certain RNGs have been able to be reverse engineered, to the point where certain types of machines are even as this is being posted being pulled from casino floors in multiple markets because of the risk of the RNG being cracked without proper casino protections.
The reality is unless an RNG is able to be cracked open, a man-made solution will generally be sufficient for slot machines to be random enough that any outcome can happen with equal frequency and ensure a fair game, which is ultimately the goal of such a thing.
The game is already built with a mathematical distribution that will ultimately achieve the house advantage desired, so the RNG is just making sure that the various permutations of outcomes available within that mathematical structure are all available to the player at the press of a button.