Your job is to load as many of the required goods as possible onto the trains before time runs out. The more cargo holds you manage to fill, the bigger your reward will be. A cargo hold is fully loaded once you fill all its crates. You have 15 hours to load trains.
Send trains out once you think you've loaded enough goods. You can do that whenever you want, though you'll only be rewarded for cargo holds in which all crates are filled. You're guaranteed to receive at least one horseshoe as a reward if you dispatch fully-loaded trains.
If you have not managed to fill all the boxes before the train left, you will not get a reward for sending out the train. Once the train has left, you will be able to see which goods you will need to load up the next train.