If the game freezes, just click inside it (games can get unresponsive if you click elsewhere on the page).
Click on the red/green switches at each crossing to change the path direction. The train will follow the green path. Pick up train cars and "pick-ups" for points. Keep the train from running into obstacles and crashing into itself.