Older style fruit machines would work purely on the basis of probability in terms of how much money they would pay out. Modern machines are usually set to pay out a certain percentage of any money that is put into them (usually between 75% and 80%).
Predicting a slot machine's payout is not possible, as modern slot machines use random number generators to determine the outcome of each spin. These random number generators ensure that each spin is independent of the previous one, making it impossible to predict the outcome with certainty.