A collision between two high-speed trains in southern Spain has killed at least 21 people and injured dozens.