This page will explain the different ways that train jams can occur, and what you can do to prevent them.
A jam is defined as a situation where trains are stuck waiting for each other, and will not get unstuck without player intervention. If the trains get unstuck themselves, then it is not a jam but merely congestion (though if it does occur you should consider improving traffic flow).
Crossover Jams
A crossover jam occurs when two trains try to pass each other, but the passing tracks are too short to fit the entire train.
Standoff Jams
A standoff jam occurs when all signals entering a junction are occupied
Overflow Jams
An overflow jam occurs when there are too many trains on a section of track.