A terminal station is a station where a line ends. All trains enter and leave the station into the same direction. These setups are usually common for city stations, where space is scarce and junctions cannot be built on both sides of the station.

However, terminal stations become very inefficient once traffic increases, because all trains have to pass the junction in front of the station twice, when entering the station and again when leaving. It is therefore necessary to make this junction as efficient as possible.

Terminal station
TTDPatch OpenTTD

A simple solution is to use pre signals. If both platforms are in use, the entry signal (yellow bar) shows "Stop!". Any approaching trains wait in front of the junction until a platform becomes available.

A much better solution is the usage of path-based signals.

Terminal station
Not in TTDPatch OpenTTD

The optimal signalling solution for terminal stations are path signals. There is a signal in front of every platform, through which a train reserves its path. When leaving, the train waits at the signal, until it can reserve a path through the junction. The signal on the other side of the junction is one-way so trains cannot leave on the wrong track.