To form a train place locomotives and wagons on the trackVehicle/Train: If you want to transport items, place a locomotive and wagon or a second loco close to each other on the track. You will see, when they connect!
Railway network/Do not cross the tracks: A train is very fast and it might happen, that you cross the track and a train comes and drives you dead. So be carefully with crossing. This is also true for any other entity. Especially the natives, which try to destroy standing trains easily, they don't have a chance against a driving train.
Railway network/Train make-up: 1, 2, 3 or more wagons? No matter how long, it's a good idea to make all trains for the same route the same length. The optimal length depends on the distance, the train has to drive and the transported amounts. Quick calculation: You can transport with one wagon about 1000 resources and you need normally about 30 second to fully load/unload that and in the optimal case with 6 inserters on both sides you can do it in 10-15 seconds. The layout of your Railway network/Train station needs to fit to that requirements.