It depends on how realistic you want the slot machine to be. If you just want it to randomly pay out, then a simple r = rand(1,X)
is fine. That's a good way to start because you can then prove that the mechanics of your game work: all the graphics and animations display correctly, the user interface controls work as expected, etc.
But a real slot machine doesn't just randomly display every possible combination. For example, if three sevens pays out more often than three cherries, then the slot machine is designed to show the three sevens much less frequently. After all, the goal of the slot machine is for the house to make money.
The math behind slot machines is quite involved: much too involved for a Stack Overflow answer. How you generate the random numbers, assuming you get a uniform distribution, is not a major concern compared to setting up your wheels to give a consistent payout.
My suggestion is that you use your built-in random number generator until you get your game working. Then, if you want it to work more like a real slot machine, type "slot machine math" into your favorite search engine, and start studying.