More than 500 passengers were on board the two trains when one ploughed into the back of another.