All slot machines use the same basic program. In all slot machines is a computer chip that generates random numbers. When you press the play button or pull the handle a random number is generated to show you either a winning combination or a losing one. The outcome of the reels is decided the moment you start them spinning. You could get less or much more depending on your luck.
Every spin is in no way related to the last spin or the next spin.
Every time you set the reels spinning a new random number is generated. That's the reason why it is possible to hit two big winning combinations in a row. A lot of players beleive that a slot machine won't pay out for a while after a big jackpot, this is completely false. This is very important, be sure to always read the paytable of the machine you are playing so that you know what you are looking for. On some slots connected to jackpots you have to bet maximum coins or credits and get the winning symbols to collect the jackpot.