Dozens of people were killed in Spain when a train derailed as it sped around a curve.