Differential learning kinetics govern the transition from memorization to generalization during in-context learning