Dynamics of relativistic heavy-ion collisions