At least seven people died when two trains collided, causing several carriages to derail and fall down an embankment.