If you have a code for Train Simulator, this can be activated via the Steam client.
To activate and install a product through Steam, please follow these steps:
1- Open the Steam client
2- Select 'Add a game' from the bottom- left hand corner of the Steam window
3- Select 'Activate a product on Steam' and click Next. Agree to the terms and conditions.
4- Enter the product code by following the instructions given
5- The product may install automatically, however you can find it in your Steam games library. Simply select the game and click on 'Install' if needed.