Nonlinear dynamics of frequency combs and soliton generation in optical microcavities