Modern casino slots are controlled by computer chips and software, and win percentages are preprogrammed into software. Casino slots have Random Number Generators (RNG) which are continually generating combinations, even when machine is not being played.
Running concurrently with RNG of casino slot machine is payout percentage.
The payout percentage controls how much slot machine will payout, for example payout percentage might be 90%, meaning slot game will payout 90% of all bets played and casino only gets to keep 10%.
This is not to say that every time you bet 10 credits you will receive 9 in return – where is fun and excitement in that? Instead casino slot machine game will not pay out for a while, and then suddenly go on a hot streak and you might hit a big jackpot.