Help with Signals
Signals are crucial for trains to share tracks. Placing them well is critical to have good traffic flow and avoid trains becoming stuck.
When trains move, they do so by reserving the track ahead of them before proceeding. If you hit the letter b during the game, you can see reservations in real-time. The reserved track will be highlighted in red.
Trains will always follow the shortest possible route to a destination. Once it determines it's route to the next station, it will reserve the track ahead. If there are no signals, it will try to reserve the entire block of track to the station. Once track is reserved, no other trains can use it until the train passes through and releases the track. Placing signals in between stations allow multiple trains to share tracks by breaking up the tracks into segments. A train will wait at a signal until the next block of track is free.
When you first place a signal, it is bi-directional. Clicking on it again and again can toggle which way it faces. Using two way/bi-directional signals (signals that face both directions) can often lead to problems, so I'd highly recommend not using them at all. In the situation pictured below, both trains are approaching the same station, and both have a bi-directional signal. Neither can proceed forward since each train is blocking the other train's way.
An alternate setup to this would be something like below. Two single tracks come to the same single platform station. There is a double-track section on either end, with one-way signals, so that trains on either end can wait for the platform to become free, and an exiting train can pass a waiting train. Be sure that the double-track area is long enough to accommodate your longest train.
For any single-track areas, placing passing loops on long segments is a good idea so that if more than one train needs to use that segment, they can both use the segment and have a place to pass each other. Again, make sure the passing area is large enough for your longest trains to fit there.
Similarly when various track segments meet, having double track passing areas is a good idea so that trains can pass each other/wait for others to pass.