After you have logged into Trainstation through the website (also called the portal), you will find the minigame on the left hand side of the screen. Pressing the "Start" button begins the randomization process. For a few seconds a train will pass across the game window, eventually stopping and displaying a wagon with the logo of the resource you have just won.
The amount of the resource you've won will depend on two factors. You get a base quantity that is 50 times your current level. (i.e. Level 177 X 50 will yeild 8850 resourse units). The second factor will be how many consecutive days you've played. You get a bonus multiplier of Days Played * 10% up to a 50% bonus. So if you have played 5 days in a row you will get a 50% bonus (8850 * .5 = 4425). This means you would recieve 13275 (8850 + 4425) resource units for this spin.