Beam dynamics in linear colliders