While you cannot crash a train into another, derailing it in the same manner as Trevor does in the Derailed mission, you can derail trains using sticky bombs. To do this, make your way to the head train car and plant at least five sticky bombs there, and exploding these devices will derail the train.