Trains will only reserve tracks to the next signal. Junctions don’t count.
So in theuros’ example:
If there is no signal in front of x (seen from where the train is coming), the junction is ignored. (Also, for the game, there’s no main or side lines. All lines are created equal.) In this case, the train which leaves the station (B or C) first, will reserve the whole track to A and block the other one from leaving the station.
If you put signals in front of x (that is, between B and x, and C and x, respectively), the train leaving the station will only reserve a path to the signal. Once it arrives there*, it tries to reserve the next part of the track, in this case from signal to A. The train that reaches its signal first, takes precedence.
* That’s a bit simplified. The game takes train speed, time to slow down to speed zero, train length, etc. into account. It probably calculates the time the train would need to slow down to stop at the signal, and reserves the track at that point, i.e. shortly before it reaches the signal. If the track’s occupied at that time, it stops the train.