One person died and five others were injured when two trains collided following a mechanical failure.