Slot machines determine a payout in two steps. A random number generator picks a result the instant the spin button is pressed, and the pay table converts that result into a win or a loss. Slots are actually random in this sense: no spin remembers the last, and a machine is never due. What the operator sets is the return to player, the share of stakes paid back over millions of spins, which is fixed in the game's software.
Bonus rounds work as games inside the game: a set of symbols triggers free spins, a pick feature or a wheel, each paid from the same return to player as the base game. Slot autoplay features run a chosen number of spins without pressing the button, with limits on losses or single wins that stop it early. The simplest way to learn slot machine features before playing is the game's own help screen or a free demo.
Paylines on a slot machine are the patterns across the reels that count as a win, from a single middle line on classic games to hundreds on modern ones. Megaways games change the number of symbols on each reel every spin, giving tens of thousands of ways to win. The buttons set the stake and the number of lines. Which type of slot machine is best depends on what a player wants: steady small wins, or large ones that come rarely.