After you have logged into TrainStation through the website (also called the portal), you will find the minigame on the right 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 (e.g. Level 177 X 50 will yield 8,850 resource 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 maximum bonus of 50%. So if you have played 5 days in a row you will get a 50% bonus (8,850 * 0.5 = 4,425). This means you would receive 13,275 (8,850 + 4,425) resource units for this spin.