Older mechanical slots work with physical reels and a coin mechanism: a coin drops past sensors that check its size and weight, a lever or button releases the reels, and stops on each reel decide the symbols. Class II slots, found in some venues, work differently again: each spin is really a round of bingo against other players, and the reels simply display the outcome of that draw in a familiar form.
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.
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 code.